def separate_users(node, user_ids):
 OSFUser = apps.get_model('osf.OSFUser')
 removed = []
 subbed = []
 for user_id in user_ids:
  try:
   user = OSFUser.load(user_id)
  except TypeError:
   user = user_id
  if node.has_permission(user, 'read'):
   subbed.append(user_id)
  else:
   removed.append(user_id)
 return (subbed, removed)

def separate_users ( node , user_ids ) : OSFUser = apps . get_model ( 'osf.OSFUser' ) removed = [ ] subbed = [ ] for user_id in user_ids : try : user = OSFUser . load ( user_id ) except TypeError : user = user_id if node . has_permission ( user , 'read' ) : subbed . append ( user_id ) else : removed . append ( user_id ) return ( subbed , removed )
separates users into ones with permissions and ones without given a list .