def METHOD_NAME(f, x, opts, evaluation):
    """produces a compiled version of f, which is callable from Python"""
    if opts["_isfindmaximum"]:
        f = -f
    cf, args = expression_to_callable_and_args(f, [x], evaluation)
    return cf