docs: def get_config(config, default_config):
      '''Load configuration from file if in config, else use default'''
      if not config:
          logging.warning('Using default config: %s', default_config)
          config = default_config
  
      try:
          with open(config, 'r') as config_file:
              return yaml.load(config_file)
      except (yaml.reader.ReaderError,
              yaml.parser.ParserError,
              yaml.scanner.ScannerError) as e:
          raise ConfigError('Invalid yaml file: \n %s' % str(e))