code: def resolve_targetfile(self, args, require_sim_name=False):  # x
          
          ttype = args.get('ttype')
          if is_null(ttype):
              sys.stderr.write('Target type must be specified')
              return (None, None)
  
          sim = args.get('sim')
          if is_null(sim):
              if require_sim_name:
                  sys.stderr.write('Simulation scenario must be specified')
                  return (None, None)
              else:
                  sim = None
  
          name_keys = dict(target_type=ttype,
                           targetlist='target_list.yaml',
                           sim_name=sim,
                           fullpath=True)
          if sim is None:
              targetfile = self.targetfile(**name_keys)
          else:
              targetfile = self.sim_targetfile(**name_keys)
  
          targets_override = args.get('targetfile')
          if is_not_null(targets_override):
              targetfile = targets_override
  
          return (targetfile, sim)
docs: Get the name of the targetfile based on the job arguments