def make_value_setter(**model_kwargs):
def set_values(f, *args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>name = kwargs.get("<STR_LIT:name>")<EOL>if name in model_kwargs:<EOL><INDENT>kwargs["<STR_LIT:value>"] = model_kwargs[name]<EOL><DEDENT>return ed.interceptable(f)(*args, **kwargs)<EOL><DEDENT>return set_values<EOL>
Creates a value-setting interceptor.

    Args:
      **model_kwargs: dict of str to Tensor. Keys are the names of random variable
        in the model to which this interceptor is being applied. Values are
        Tensors to set their value to.

    Returns:
      set_values: Function which sets the value of intercepted ops.