<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _index_buses(self, buses):
 """ Set up indexing for updating v. """

        refs = [bus._i for bus in buses if bus.type == REFERENCE]
#        if len(refs) != 1:
#            raise SlackBusError
        pv = [bus._i for bus in buses if bus.type == PV]
        pq = [bus._i for bus in buses if bus.type == PQ]
        pvpq = pv + pq

        return refs, pq, pv, pvpq