code: def load_library(filename, match, folder, token, host):
      
      with open(filename, 'rb') as file_obj:
          res = requests.post(
              host + '/api/1.2/libraries/upload',
              auth=('token', token),
              data={
                  'libType': match.lib_type,
                  'name': '{0}-{1}'.format(match.library_name, match.version),
                  'folder': folder,
              },
              files={'uri': file_obj}
          )
  
      if res.status_code != 200:
          raise APIError(res)
docs: upload an egg to the Databricks filesystem.
  
      Parameters
      ----------
      filename: string
          local location of file to upload
      match: FilenameMatch object
          match object with library_type, library_name, and version
      folder: string
          Databricks folder to upload to
          (e.g. '/Users/htorrence@shoprunner.com/')
      token: string
          Databricks API key
      host: string
          Databricks host (e.g. https://my-organization.cloud.databricks.com)
  
      Side Effects
      ------------
      uploads egg to Databricks