def METHOD_NAME(relay_ir, input, input_name: str, params, filename: str):
    """Writes the `.data` file to `filename` for Calyx simulation, with
    the corresponding parameter values. `input` is the data being
    classified, and `input_name` is its name. `params` are the
    parameters from the ONNX model."""
    input_name = relay_visitor.rename_relay_var(input_name)
    # Get the memories from the Calyx program.
    data = relay_visitor.get_program_dat_memories(relay_ir)
    # Write the input.
    data[input_name] = {
        "data": input.tolist(),
        "format": {
            "numeric_type": "fixed_point",
            "is_signed": IS_SIGNED,
            "width": WIDTH,
            "frac_width": FRAC_WIDTH,
        },
    }
    # Write the actual parameter values.
    for name, value in params.items():
        # The exact same operations are done on names of variables in relay_visitor.py
        new_name = relay_visitor.rename_relay_var(name)
        data[new_name] = {
            "data": value.asnumpy().tolist(),
            "format": {
                "numeric_type": "fixed_point",
                "is_signed": IS_SIGNED,
                "width": WIDTH,
                "frac_width": FRAC_WIDTH,
            },
        }
    with open(filename, "w") as file:
        sjson.dump(data, file, sort_keys=True, indent=2)