def METHOD_NAME(expression):
    example = []
    remaining = expression
    while True:
        match = search_variable(remaining)
        if not match:
            break
        example[-1:] = [match.before, match.identifier, match.base, match.after]
        remaining = example[-1]
    if not example:
        return ''
    example = ''.join(example)
    return (f"Variables in the original expression '{expression}' were resolved "
            f"before the expression was evaluated. Try using '{example}' "
            f"syntax to avoid that. See Evaluating Expressions appendix in "
            f"Robot Framework User Guide for more details.")