def compile_user_lists(files, user, source_node, node):
 move = {key: [] for key in constants.NOTIFICATION_TYPES}
 warn = {key: [] for key in constants.NOTIFICATION_TYPES}
 remove = {key: [] for key in constants.NOTIFICATION_TYPES}
 if (len(files) == 0):
  (move, warn, remove) = categorize_users(user, 'file_updated', source_node, 'file_updated', node)
 for file_path in files:
  path = file_path.strip('/')
  (t_move, t_warn, t_remove) = categorize_users(user, (path + '_file_updated'), source_node, (path + '_file_updated'), node)
  for notification in constants.NOTIFICATION_TYPES:
   move[notification] = list(set(move[notification]).union(set(t_move[notification])))
   warn[notification] = list(set(warn[notification]).union(set(t_warn[notification])))
   remove[notification] = list(set(remove[notification]).union(set(t_remove[notification])))
 return (move, warn, remove)

def compile_user_lists ( files , user , source_node , node ) : move = { key : [ ] for key in constants . NOTIFICATION_TYPES } warn = { key : [ ] for key in constants . NOTIFICATION_TYPES } remove = { key : [ ] for key in constants . NOTIFICATION_TYPES } if ( len ( files ) == 0 ) : ( move , warn , remove ) = categorize_users ( user , 'file_updated' , source_node , 'file_updated' , node ) for file_path in files : path = file_path . strip ( '/' ) ( t_move , t_warn , t_remove ) = categorize_users ( user , ( path + '_file_updated' ) , source_node , ( path + '_file_updated' ) , node ) for notification in constants . NOTIFICATION_TYPES : move [ notification ] = list ( set ( move [ notification ] ) . union ( set ( t_move [ notification ] ) ) ) warn [ notification ] = list ( set ( warn [ notification ] ) . union ( set ( t_warn [ notification ] ) ) ) remove [ notification ] = list ( set ( remove [ notification ] ) . union ( set ( t_remove [ notification ] ) ) ) return ( move , warn , remove )
take multiple file ids and compiles them .