def _SetupLoad(self):
    """Performs common verification and set up for upload and download."""
    if len(self.args) != 1:
      self.parser.error('Expected <directory> argument.')

    basepath = self.args[0]
    appyaml = self._ParseAppYaml(basepath)

    self.options.app_id = appyaml.application

    if not self.options.url:
      url = self.InferRemoteApiUrl(appyaml)
      if url is not None:
        self.options.url = url

    self._CheckRequiredLoadOptions()

    if self.options.batch_size < 1:
      self.parser.error('batch_size must be 1 or larger.')

    if verbosity == 1:
      logging.getLogger().setLevel(logging.INFO)
      self.options.debug = False
    else:
      logging.getLogger().setLevel(logging.DEBUG)
      self.options.debug = True
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/tools/appcfg.py/AppCfgApp._SetupLoad/original