def METHOD_NAME(vars_needed, replacements=None, model=None):
    R"""
    Replace random variable nodes in the graph with values given by the replacements dict.
    Uses untransformed versions of the inputs, performs some basic input validation.
    Parameters
    ----------
    vars_needed: list of TensorVariables
        A list of variable outputs
    replacements: dict with string keys, numeric values
        The variable name and values to be replaced in the model graph.
    model: Model
        A PyMC model object
    """
    model = modelcontext(model)
    inputs, input_names = [], []
    for rv in walk_model(vars_needed):
        if rv in model.named_vars.values() and not isinstance(rv, SharedVariable):
            inputs.append(rv)
            input_names.append(rv.name)
    # Then it's deterministic, no inputs are required, can eval and return
    if len(inputs) == 0:
        return tuple(v.eval() for v in vars_needed)
    fn = compile_pymc(
        inputs,
        vars_needed,
        allow_input_downcast=True,
        accept_inplace=True,
        on_unused_input="ignore",
    )
    # Remove unneeded inputs
    replacements = {name: val for name, val in replacements.items() if name in input_names}
    missing = set(input_names) - set(replacements.keys())
    # Error if more inputs are needed
    if len(missing) > 0:
        missing_str = ", ".join(missing)
        raise ValueError(f"Values for {missing_str} must be included in `replacements`.")
    return fn(**replacements)