def METHOD_NAME(formater):
    if formater == "ParquetDialect":
        qq_format = QueryFormat(
            type=QueryFormatType.PARQUET,
            parquet_text_configuration=' '
        )
    elif isinstance(formater, DelimitedJsonDialect):
        serialization_settings = JsonTextConfiguration(
            record_separator=formater.delimiter
        )
        qq_format = QueryFormat(
            type=QueryFormatType.json,
            json_text_configuration=serialization_settings)
    elif hasattr(formater, 'quotechar'):  # This supports a csv.Dialect as well
        try:
            headers = formater.has_header
        except AttributeError:
            headers = False
        serialization_settings = DelimitedTextConfiguration(
            column_separator=formater.delimiter,
            field_quote=formater.quotechar,
            record_separator=formater.lineterminator,
            escape_char=formater.escapechar,
            headers_present=headers
        )
        qq_format = QueryFormat(
            type=QueryFormatType.delimited,
            delimited_text_configuration=serialization_settings
        )
    elif isinstance(formater, list):
        serialization_settings = ArrowConfiguration(
            schema=formater
        )
        qq_format = QueryFormat(
            type=QueryFormatType.arrow,
            arrow_configuration=serialization_settings)
    elif not formater:
        return None
    else:
        raise TypeError("Format must be DelimitedTextDialect or DelimitedJsonDialect or ParquetDialect.")
    return QuerySerialization(format=qq_format)