<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ref_bus_angle_constraint(self, buses, Va, xmin, xmax):
 """ Adds a constraint on the reference bus angles. """

        refs = [bus._i for bus in buses if bus.type == REFERENCE]
        Varefs = array([b.v_angle for b in buses if b.type == REFERENCE])

        xmin[Va.i1 - 1 + refs] = Varefs
        xmax[Va.iN - 1 + refs] = Varefs

        return xmin, xmax