code: def is_filter_tuple(tup):
      
      return isinstance(tup, (tuple, list)) and (
          len(tup) == 3 and
          isinstance(tup[0], string_types) and
          callable(tup[1]))
docs: Return whether a `tuple` matches the format for a column filter