nodes: 0, module; 1, function_definition; 2, function_name:sortframe; 3, parameters; 4, block; 5, identifier:frame; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, string; 13, assignment; 14, assignment; 15, assignment; 16, assignment; 17, identifier:frame; 18, string_content:sorts particles for a frame; 19, identifier:d; 20, subscript; 21, identifier:sortedargs; 22, call; 23, identifier:d; 24, subscript; 25, subscript; 26, identifier:d; 27, identifier:frame; 28, string; 29, attribute; 30, argument_list; 31, identifier:d; 32, identifier:sortedargs; 33, identifier:frame; 34, string; 35, string_content:data; 36, identifier:np; 37, identifier:lexsort; 38, list; 39, string_content:data; 40, subscript; 41, subscript; 42, subscript; 43, identifier:d; 44, string; 45, identifier:d; 46, string; 47, identifier:d; 48, string; 49, string_content:xi; 50, string_content:yi; 51, string_content:zi
code: def sortframe(frame):
      '''
      sorts particles for a frame
      '''
      d = frame['data'];
      sortedargs = np.lexsort([d['xi'],d['yi'],d['zi']])
      d = d[sortedargs];
      frame['data']=d;
      return frame;