code: def parse_known_args(self, args=None, namespace=None):
          
          # run parse args once to make sure the name space is populated with
          # the input files. We'll turn off raising NoInputFileErrors on this
          # pass
          self.no_input_file_err = True
          self._unset_required()
          opts, extra_opts = super(ResultsArgumentParser, self).parse_known_args(
              args, namespace)
          # now do it again
          self.no_input_file_err = False
          self._reset_required()
          opts, extra_opts = super(ResultsArgumentParser, self).parse_known_args(
              args, opts)
          # populate the parameters option if it wasn't specified
          if opts.parameters is None:
              parameters = get_common_parameters(opts.input_file,
                                                 collection='variable_params')
              # now call parse parameters action to populate the namespace
              self.actions['parameters'](self, opts, parameters)
          # parse the sampler-specific options and check for any unknowns
          unknown = []
          for fn in opts.input_file:
              fp = loadfile(fn, 'r')
              sampler_parser, _ = fp.extra_args_parser(skip_args=self.skip_args)
              if sampler_parser is not None:
                  opts, still_unknown = sampler_parser.parse_known_args(
                      extra_opts, namespace=opts)
                  unknown.append(set(still_unknown))
          # the intersection of the unknowns are options not understood by
          # any of the files
          if len(unknown) > 0:
              unknown = set.intersection(*unknown)
          return opts, list(unknown)
docs: Parse args method to handle input-file dependent arguments.