code: def infer(pattern, base_path=None):
      
      package = Package({}, base_path=base_path)
      descriptor = package.infer(pattern)
      return descriptor
docs: https://github.com/frictionlessdata/datapackage-py#infer