def METHOD_NAME(self, expr, context):
    """
    Evaluate a marker expression returned by the :func:`parse_requirement`
    function in the specified context.
    """
    if isinstance(expr, string_types):
        if expr[0] in '\'"':
            result = expr[1:-1]
        else:
            if expr not in context:
                raise SyntaxError('unknown variable: %s' % expr)
            result = context[expr]
    else:
        assert isinstance(expr, dict)
        op = expr['op']
        if op not in self.operations:
            raise NotImplementedError('op not implemented: %s' % op)
        elhs = expr['lhs']
        erhs = expr['rhs']
        if _is_literal(expr['lhs']) and _is_literal(expr['rhs']):
            raise SyntaxError('invalid comparison: %s %s %s' % (elhs, op, erhs))
        lhs = self.METHOD_NAME(elhs, context)
        rhs = self.METHOD_NAME(erhs, context)
        if ((_is_version_marker(elhs) or _is_version_marker(erhs)) and
            op in ('<', '<=', '>', '>=', '===', '==', '!=', '~=')):
            lhs = NV(lhs)
            rhs = NV(rhs)
        elif _is_version_marker(elhs) and op in ('in', 'not in'):
            lhs = NV(lhs)
            rhs = _get_versions(rhs)
        result = self.operations[op](lhs, rhs)
    return result