def METHOD_NAME(self):
    m = pyo.ConcreteModel()
    m.time = pyo.Set(initialize=[1, 2, 3])
    m.v1 = pyo.Var(m.time, initialize={i: 1 * i for i in m.time})
    m.v2 = pyo.Var(m.time, initialize={i: 2 * i for i in m.time})
    setpoint_data = {
        str(pyo.ComponentUID(m.v1)): 3.0,
    }
    weight_data = {
        str(pyo.ComponentUID(m.v1)): 0.1,
    }
    with self.assertRaisesRegex(KeyError, "Setpoint data"):
        m.tracking_expr = get_tracking_cost_from_constant_setpoint(
            [m.v1, m.v2],
            m.time,
            setpoint_data,
        )
    setpoint_data = {
        str(pyo.ComponentUID(m.v1)): 3.0,
        str(pyo.ComponentUID(m.v2)): 4.0,
    }
    with self.assertRaisesRegex(KeyError, "Tracking weight"):
        m.tracking_expr = get_tracking_cost_from_constant_setpoint(
            [m.v1, m.v2],
            m.time,
            setpoint_data,
            weight_data=weight_data,
        )