nodes: 0, module; 1, function_definition; 2, function_name:find_files; 3, parameters; 4, block; 5, identifier:folder; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Discover stereo photos and return them as a pairwise sorted list."""; 13, assignment; 14, call; 15, identifier:i; 16, call; 17, block; 18, assignment; 19, identifier:files; 20, identifier:files; 21, list_comprehension; 22, attribute; 23, argument_list; 24, identifier:range; 25, argument_list; 26, expression_statement; 27, expression_statement; 28, identifier:files; 29, list_comprehension; 30, identifier:i; 31, for_in_clause; 32, if_clause; 33, identifier:files; 34, identifier:sort; 35, call; 36, assignment; 37, call; 38, call; 39, for_in_clause; 40, identifier:i; 41, call; 42, call; 43, identifier:len; 44, argument_list; 45, identifier:insert_string; 46, call; 47, attribute; 48, argument_list; 49, attribute; 50, argument_list; 51, identifier:filename; 52, identifier:files; 53, attribute; 54, argument_list; 55, attribute; 56, argument_list; 57, identifier:files; 58, attribute; 59, argument_list; 60, identifier:files; 61, identifier:insert; 62, binary_operator:i * 2 + 1; 63, identifier:insert_string; 64, attribute; 65, identifier:join; 66, identifier:folder; 67, identifier:filename; 68, identifier:os; 69, identifier:listdir; 70, identifier:folder; 71, identifier:i; 72, identifier:startswith; 73, string:"left"; 74, string:"right{}"; 75, identifier:format; 76, subscript; 77, binary_operator:i * 2; 78, integer:1; 79, identifier:os; 80, identifier:path; 81, subscript; 82, slice; 83, identifier:i; 84, integer:2; 85, identifier:files; 86, binary_operator:i * 2; 87, integer:4; 88, identifier:i; 89, integer:2
code: def find_files(folder):
      """Discover stereo photos and return them as a pairwise sorted list."""
      files = [i for i in os.listdir(folder) if i.startswith("left")]
      files.sort()
      for i in range(len(files)):
          insert_string = "right{}".format(files[i * 2][4:])
          files.insert(i * 2 + 1, insert_string)
      files = [os.path.join(folder, filename) for filename in files]
      return files