def METHOD_NAME(
    filters: List[Tuple[Column, str, Any]], or_filter: bool = False
) -> Optional[BinaryExpression]:
    """Dynamically build query filter
    Args:
        filters (List[Tuple[Column, str, Any]]): list of tuples representing filters.
            The first value is the column, the second the comparison operators (e.g. "ge", "lt", "eq", "in", etc.) and
            the last value the comparison value. e.g. (Column("foo"), "ge", 1) will produce "foo >= 1".
        or_filter (bool, optional): whether to perform an OR or AND condition. Defaults to False (i.e. AND).
    Returns:
        BinaryExpression: a filter pattern
    """
    list_of_filters = []
    for filter_ in filters:
        column, operator, value = filter_
        try:
            filter_attr = (
                next(
                    filter(
                        lambda x: hasattr(column, x % operator), ["%s", "%s_", "__%s__"]
                    ),
                    None,
                )
                % operator
            )  # type: ignore
        except TypeError as err:
            logger.debug(traceback.format_exc())
            logger.error(f"Error when looking for operator {operator} - {err}")
        else:
            list_of_filters.append(getattr(column, filter_attr)(value))
    if not list_of_filters:
        logger.debug("No filters found.")
        return None
    if or_filter:
        return or_(*list_of_filters)
    return and_(*list_of_filters)