docs: def bulk_set_network_owners(network_owners, **kwargs):
      """
          Set the network owner of multiple networks at once.
          Accepts a list of JSONObjects which look like:
              {
               'network_id': XX,
               'user_id'   : YY,
               'view'      : 'Y'/ 'N'
               'edit'      : 'Y'/ 'N'
               'share'      : 'Y'/ 'N'
              }
             """
      
      network_ids = [no.network_id for no in network_owners]
  
      existing_projowners = db.DBSession.query(NetworkOwner).filter(NetworkOwner.network_id.in_(network_ids)).all()
  
      #Create a lookup based on the unique key for this table (network_id, user_id)
      no_lookup = {}
      
      for no in existing_projowners:
          no_lookup[(no.network_id, no.user_id)] = no
  
      for network_owner in network_owners:
          #check if the entry is already there
          if no_lookup.get((network_owner.network_id, network_owner.user_id)):
              continue
  
          new_no = NetworkOwner()
          new_no.network_id = network_owner.network_id
          new_no.user_id    = network_owner.user_id
          new_no.view       = network_owner.view
          new_no.edit       = network_owner.edit
          new_no.share      = network_owner.share
  
          db.DBSession.add(new_no)
  
      db.DBSession.flush()