docs: def get_config():
      """Return a configuration dict"""
      from os import environ
      from os.path import expanduser
      from pathlib import Path
      import yaml
  
      def pexp(p):
          try:
              return Path(p).expanduser()
          except AttributeError:
              # python 3.4
              return Path(expanduser(p))
  
      paths = [environ.get("METAPACK_CONFIG"), '~/.metapack.yaml', '/etc/metapack.yaml']
  
      for p in paths:
  
          if not p:
              continue
  
          p = pexp(p)
  
          if p.exists():
              with p.open() as f:
                  config = yaml.safe_load(f)
                  if not config:
                      config = {}
  
                  config['_loaded_from'] = str(p)
                  return config
  
      return None