def type_operator(input_type, label=None,
                  assert_type_for_arguments=True):
    def wrapper(func):
        func.is_operator = True
        func.label = label \
            or fn_name_to_pretty_label(func.__name__)
        func.input_type = input_type

        @wraps(func)
        def inner(self, *args, **kwargs):
            if assert_type_for_arguments:
                args = [self._assert_valid_value_and_cast(arg) for arg in args]
                kwargs = dict((k, self._assert_valid_value_and_cast(v))
                              for k, v in kwargs.items())
            return func(self, *args, **kwargs)
        return inner
    return wrapper
Flush message queue if there's an active connection running
dataset/ETHPy150Open venmo/business-rules/business_rules/operators.py/type_operator--crossover with--dataset/ETHPy150Open mrjoes/tornadio2/tornadio2/session.py/Session.flush