code: def required_opts_multi_ifo(opt, parser, ifo, opt_list, required_by=None):
      
      for name in opt_list:
          attr = name[2:].replace('-', '_')
          try:
              if getattr(opt, attr)[ifo] is None:
                  raise KeyError
          except KeyError:
              err_str = "%s is missing " % name
              if required_by is not None:
                  err_str += ", required by %s" % required_by
              parser.error(err_str)
docs: Check that all the opts are defined
  
      Parameters
      ----------
      opt : object
          Result of option parsing
      parser : object
          OptionParser instance.
      ifo : string
      opt_list : list of strings
      required_by : string, optional
          the option that requires these options (if applicable)