def get_asset_resource(service, type):
  return {
    Asset.TABLE: service.tables(),
    Asset.RASTER: service.rasters(),
    Asset.RASTER_COLLECTION: service.rasterCollections(),
    Asset.LAYER: service.layers(),
    Asset.MAP: service.maps(),
    Asset.PROJECT: service.projects()
  }[type]
Gets the correct base resource for an asset.
dataset/ETHPy150Open keithmoss/Hodor/hodor/gme.py/get_asset_resource