from typing import Any
import re


def __is_condition_met(condition_type: str, condition_value: Any, value: Any) -> bool:
    """
    Checks if given value meets the given condition
    Args:
        condition_type: condition type, could be "equal" or "regex"
        condition_value: the value of the condition, in case of regex it's the pattern, and
                         a value to compare to in case of equal
        value: the target value to run the condition against

    Returns: bool, True of condition is met, False otherwise
    """

    if condition_type == 'equal':
        return value == condition_value

    if condition_type == 'regex':
        matcher = re.compile(condition_value)
        return bool(matcher.search(value))

    raise NotImplementedError(f'__is_condition_met is not implemented for condition type "{condition_type}"', )