def get_object_level_network(node):
    """
    Query first object level network of selected node

    Args:
        node (hou.Node): Look for first object level network for this node
        
    Returns 
        network (hou.Node): Object level network
    """

    # Node containing all sops
    if node.type().category().name() == 'Sop':
        rig_node = node.parent()
        parent = rig_node.parent()
    else:
        parent = node.parent()

    while True:

        if parent.type().category().name() == 'Object':
            return parent
        elif parent == None:
            raise ValueError('Can\'t find object level network for {} node'.format(node.name()))

        parent = parent.parent()
    
    return None