code: def load_swagger_config(name, base_url, config):
     
     if isinstance(config, collections.abc.Mapping):
         pass
     elif isinstance(config, str):
         with pathlib.Path(config).open('r') as infile:
             config = yaml.load(infile)
  
     elif isinstance(config, pathlib.Path):
         with config.open('r') as infile:
             config = yaml.load(infile)
  
     else:
         raise TypeError('Cannot load swagger config from type: {}'.format(type(config)))
  
  
     service_config = dict([
             ('name', name), ('base_url', base_url), ('apis', defaultdict(dict))])
  
     apis = config['apis']
  
  
     for api in apis:
         # /some/path/to/my_resource -> MyResource
         resource = snake_case_to_camel_case(api['path'].rsplit('/', 1)[-1])
         for op in api['operations']:
             verb = op['method'].upper()
             args = [(param['name'], {'default' : None}) for param in op['parameters']
                     if param['paramType'].lower() != 'header']
  
             definition = dict([
                ('url',  api['path']),
                (verb, dict(args))
                 ])
  
             service_config['apis'][resource].update(definition)
  
     return service_config
docs: Load a restful service specified by some YAML file at config_path.
  
     :param config_path: A pathlib Path object that points to the yaml
         config
     :returns: A python module containing a Client class, call factory,
         and the definition of each of the APIs defined by the config.