def METHOD_NAME(self):
    """
    Check the lambda for the time format. Raise an exception if the value is wrong
    """
    LAMBDA = lambda: 0  # noqa: E731
    if self.timeformat_lambda is None or (
        isinstance(self.timeformat_lambda, type(LAMBDA)) and self.timeformat_lambda.__name__ == LAMBDA.__name__
    ):
        return True
    else:
        ValueError("Expected [None] or [lambda function] for argument [timeformat_func]")