def METHOD_NAME(expr, rng=None, **kwargs):
    """
    Parameters:
    expr - a pyll expression to be evaluated
    rng - a np.random.Generator instance
          default: `np.random.default_rng()`
    **kwargs - optional arguments passed along to
               `hyperopt.pyll.rec_eval`
    """
    if rng is None:
        rng = np.random.default_rng()
    foo = recursive_set_rng_kwarg(clone(as_apply(expr)), as_apply(rng))
    return rec_eval(foo, **kwargs)