def METHOD_NAME(segarr):
    filtname = func.__name__
    if any(c not in segarr for c in colnames):
        raise ValueError(msg.format(filtname, *colnames))
    result = func(segarr)
    logging.info(
        "Filtered by '%s' from %d to %d rows",
        filtname,
        len(segarr),
        len(result),
    )
    return result