

def WarnAndTranslateDiskTypes(name, cloud):
    "Translate old disk types to new disk types, printing warnings if needed.\n\n  Args:\n    name: a string specifying a disk type, either new or old.\n    cloud: the cloud we're running on.\n\n  Returns:\n    The new-style disk type name (i.e. the provider's name for the type).\n  "
    if (cloud in DISK_TYPE_MAPS):
        disk_type_map = DISK_TYPE_MAPS[cloud]
        if ((name in disk_type_map) and (disk_type_map[name] != name)):
            new_name = disk_type_map[name]
            logging.warning('Disk type name %s is deprecated and will be removed. Translating to %s for now.', name, new_name)
            return new_name
        else:
            return name
    else:
        logging.info('No legacy->new disk type map for provider %s', cloud)
        return cloud

dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/disk.py WarnAndTranslateDiskTypes/VarMisuse@95/305 `name`->`cloud`