def remove_attacked_feature(attack_feature: int | slice, non_numerical_features: list[int] | None):
    """
    Removes the attacked feature from the list of non-numeric features to encode.

    :param attack_feature: The index or slice representing a feature to attack
    :param non_numerical_features: a list of feature indexes that require encoding in order to feed into an ML model
                                    (i.e., strings)
    :return:
    """
    if non_numerical_features is not None and isinstance(attack_feature, int):
        if attack_feature in non_numerical_features:
            non_numerical_features.remove(attack_feature)

    Removes the attacked feature from the list of non-numeric features to encode.

    :param attack_feature: The index or slice representing a feature to attack
    :param non_numerical_features: a list of feature indexes that require encoding in order to feed into an ML model
                                    (i.e., strings)
    :return:
    
art/utils.py