def create_bus(net, level, name, zone=None, check=True):
    """
    Create a bus on a given network

    :param net: the given network
    :param level: nominal pressure level of the bus
    :param name: name of the bus
    :param zone: zone of the bus (default: None)
    :param check: If True, check the integrity of the input
    :return: name of the bus
    """
    if check:
        if level not in net.levels:
            msg = 'The pressure level of the bus {} is not in {}'.format(name,
                net.levels)
            raise ValueError(msg)
        if name in net.bus.index:
            msg = 'The bus {} already exists'.format(name)
            raise ValueError(msg)
    net.bus.loc[name] = [level, zone, 'NODE']
    return name
