Parses `string` and returns an :class:`Operator`
        object.

        :raises: :exc:`InvalidOperatorExpression` If `string` is not \
        a valid operator.

        Valid operators are ``==``, ``!=``, ``<``, ``>``, ``<=``, and ``>=``.

def parse(cls, string):
        """Parses `string` and returns an :class:`Operator`
        object.

        :raises: :exc:`InvalidOperatorExpression` If `string` is not \
        a valid operator.

        Valid operators are ``==``, ``!=``, ``<``, ``>``, ``<=``, and ``>=``.

        """
        if string in STR_TO_OP_FUNC:
            return cls(STR_TO_OP_FUNC[string], string)
        else:
            raise InvalidOperatorExpression(string)