code: def getConfig(filepath=None):  # pragma: no cover
      
      parser = configparser.ConfigParser()
  
      filepaths = []
      # Lowest priority goes first in the list
      home = os.getenv("HOME")
      if home:
          default_filepath = os.path.join(home, ".green")
          if os.path.isfile(default_filepath):
              filepaths.append(default_filepath)
  
      # Low priority
      env_filepath = os.getenv("GREEN_CONFIG")
      if env_filepath and os.path.isfile(env_filepath):
          filepaths.append(env_filepath)
  
      # Medium priority
      for cfg_file in ("setup.cfg", ".green"):
          cwd_filepath = os.path.join(os.getcwd(), cfg_file)
          if os.path.isfile(cwd_filepath):
              filepaths.append(cwd_filepath)
  
      # High priority
      if filepath and os.path.isfile(filepath):
          filepaths.append(filepath)
  
      if filepaths:
          global files_loaded
          files_loaded = filepaths
          # Python 3 has parser.read_file(iterator) while Python2 has
          # parser.readfp(obj_with_readline)
          read_func = getattr(parser, 'read_file', getattr(parser, 'readfp'))
          for filepath in filepaths:
              # Users are expected to put a [green] section
              # only if they use setup.cfg
              if filepath.endswith('setup.cfg'):
                  with open(filepath) as f:
                      read_func(f)
              else:
                  read_func(ConfigFile(filepath))
  
      return parser
docs: Get the Green config file settings.
  
      All available config files are read.  If settings are in multiple configs,
      the last value encountered wins.  Values specified on the command-line take
      precedence over all config file settings.
  
      Returns: A ConfigParser object.