def wrapped(*args, **kwargs): fun = f if plate is not None: fun = plate_util.make_plate(fun, name=plate) if name is not None: return random_variable(nest(fun, scope=name)(*args, **kwargs), name=name) return fun(*args, **kwargs)
def transform(f: Program) -> Program: return plate_util.make_plate(f, name=name)