def METHOD_NAME(cls, legacy_config: Mapping[str, Any], file_type: str) -> Mapping[str, Any]:
    if file_type.casefold() not in VALID_FILE_TYPES:
        raise ValueError(f"Format filetype {file_type} is not a supported file type")
    if file_type.casefold() == "parquet" or file_type.casefold() == "avro":
        legacy_config = cls._transform_legacy_parquet_or_avro_config(legacy_config)
    return {file_type: VALID_FILE_TYPES[file_type.casefold()].parse_obj({key: val for key, val in legacy_config.items()})}