from typing import Tuple


def create_categorical_encoder_and_decoder(categorical_variables: list[str]) -> Tuple[dict, dict]:
    """
    Given a list of categorical variables, returns an encoder and decoder.
    Encoder Key = category. Value = integer encoding.
    Decoder Key = integer encoding. Value = category.
    """
    decoder = {}
    encoder = {}
    for idx, variable in enumerate(categorical_variables):
        decoder[idx] = variable
        encoder[variable] = idx
    return decoder, encoder