def _change_bus_type(net, bus, bus_type):
    """
    Bus can have three type: NODE, SRCE and LOAD. This function allows to change between these different type.

    :param net: a pandangas network
    :param bus: the bus whoses type should be changed
    :param bus_type: the bus type
    :return: none
    """
    old_type = net.bus.loc[bus, 'type']
    try:
        assert old_type == 'NODE'
    except AssertionError:
        msg = 'The buses {} is already a {} !'.format(bus, old_type)
        raise ValueError(msg)
    net.bus.loc[bus, 'type'] = bus_type
