code: def boolean_or_list(config_name, args, configs, alternative_names=[]):
      
  
      # when argument flag present, set to wildcard regex
      for key in alternative_names + [config_name]:
          if hasattr(args, key) and getattr(args, key):
              setattr(args, config_name, ['.*'])
              return
  
      setattr(args, config_name, [])
  
      option = None
      alternative_names.insert(0, config_name)
      for key in alternative_names:
          if configs.has_option('settings', key):
              option = configs.get('settings', key)
              break
  
      if option is not None:
          if option.strip().lower() == 'true':
              setattr(args, config_name, ['.*'])
          elif option.strip().lower() != 'false':
              for pattern in option.split("\n"):
                  if pattern.strip() != '':
                      getattr(args, config_name).append(pattern)
docs: Get a boolean or list of regexes from args and configs.