def METHOD_NAME(self, model):
    filename = "temp.yaml"
    m = model
    dict_to_write = {}
    for pyo_obj in m.component_data_objects((pyo.Var, pyo.Param), active=True):
        for k in range(10):
            dict_to_write[pyo_obj.name] = np.random.rand()
    with open(filename, "w") as fp:
        yaml.dump(dict_to_write, fp, sort_keys=False)
    return filename, dict_to_write