def METHOD_NAME(netname, iface, user_reference=None):
    """
    Create a libvirt network if it does not yet exist.
    The user_reference argument is a unique identifier of the caller,
    used to track the network users.
    """
    with _libvirt_net_lock:
        if not is_libvirt_network(netname):
            bridged = netname == iface
            iface = None if bridged else iface
            _createNetwork(createNetworkDef(netname, bridged, iface))
        NetworksUsersCache.add(netname, user_reference)