def _quote_table_name(table_name, connection, enable_quote: bool):
    """
    Returns quoted table name.

    Put database-specific quotation marks around the table name
    to preven that tables with substrings of the table are considered.
    E.g. cachalot_testparent must not return cachalot_test.
    """
    return f'{connection.ops.quote_name(table_name)}' \
        if enable_quote else table_name