code: def app_main(self, experiment=None, last=False, new=False,
                   verbose=False, verbosity_level=None, no_modification=False,
                   match=False):
          if match:
              patt = re.compile(experiment)
              matches = list(filter(patt.search, self.config.experiments))
              if len(matches) > 1:
                  raise ValueError("Found multiple matches for %s: %s" % (
                      experiment, matches))
              elif len(matches) == 0:
                  raise ValueError("No experiment matches %s" % experiment)
              experiment = matches[0]
          if last and self.config.experiments:
              self.experiment = None
          elif new and self.config.experiments:
              try:
                  self.experiment = utils.get_next_name(self.experiment)
              except ValueError:
                  raise ValueError(
                      "Could not estimate an experiment id! Please use the "
                      "experiment argument to provide an id.")
          else:
              self._experiment = experiment
          if verbose:
              verbose = logging.DEBUG
          elif verbosity_level:
              if verbosity_level in ['DEBUG', 'INFO', 'WARNING', 'ERROR']:
                  verbose = getattr(logging, verbosity_level)
              else:
                  verbose = int(verbosity_level)
          if verbose:
              logging.getLogger(
                  utils.get_toplevel_module(inspect.getmodule(self))).setLevel(
                      verbose)
              self.logger.setLevel(verbose)
          self.no_modification = no_modification