<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_column_filter(definition):
 """Parse a `str` of the form 'column>50' Parameters definition : `str` a column filter definition of the form ``<name><operator><threshold>`` or ``<threshold><operator><name><operator><threshold>``, e.g. ``frequency >= 10``, or ``50 < snr < 100`` Returns ------- filters : `list` of `tuple` a `list` of filter 3-`tuple`s, where each `tuple` contains the following elements: - ``column`` (`str`) - the name of the column on which to operate - ``operator`` (`callable`) - the operator to call when evaluating the filter - ``operand`` (`anything`) - the argument to the operator function Raises ------ ValueError if the filter definition cannot be parsed KeyError if any parsed operator string cannnot be mapped to a function from the `operator` module Notes ----- Strings that contain non-alphanumeric characters (e.g. hyphen `-`) should be quoted inside the filter definition, to prevent such characters being interpreted as operators, e.g. ``channel = X1:TEST`` should always be passed as ``channel = "X1:TEST"``. Examples -------- [('frequency', <function operator.gt>, 10.)] [('snr', <function operator.gt>, 50.), ('snr', <function operator.lt>, 100.)] [('channel', <function operator.eq>, 'H1:TEST')] """
  # noqa
    # parse definition into parts (skipping null tokens)
    parts = list(generate_tokens(StringIO(definition.strip()).readline))
    while parts[-1][0] in (token.ENDMARKER, token.NEWLINE):
        parts = parts[:-1]

    # parse simple definition: e.g: snr > 5
    if len(parts) == 3:
        a, b, c = parts  # pylint: disable=invalid-name
        if a[0] in [token.NAME, token.STRING]:  # string comparison
            name = QUOTE_REGEX.sub('', a[1])
            oprtr = OPERATORS[b[1]]
            value = _float_or_str(c[1])
            return [(name, oprtr, value)]
        elif b[0] in [token.NAME, token.STRING]:
            name = QUOTE_REGEX.sub('', b[1])
            oprtr = OPERATORS_INV[b[1]]
            value = _float_or_str(a[1])
            return [(name, oprtr, value)]

    # parse between definition: e.g: 5 < snr < 10
    elif len(parts) == 5:
        a, b, c, d, e = list(zip(*parts))[1]  # pylint: disable=invalid-name
        name = QUOTE_REGEX.sub('', c)
        return [(name, OPERATORS_INV[b], _float_or_str(a)),
                (name, OPERATORS[d], _float_or_str(e))]

    raise ValueError("Cannot parse filter definition from %r" % definition)