nodes: 0, module; 1, function_definition; 2, function_name:get_models; 3, parameters; 4, block; 5, expression_statement; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""Finds all models, returning a list of model number and names
      sorted increasing.
  
      Returns: [(13, 000013-modelname), (17, 000017-modelname), ...etc]
      """; 11, assignment; 12, assignment; 13, assignment; 14, identifier:model_numbers_names; 15, identifier:all_models; 16, call; 17, identifier:model_filenames; 18, list_comprehension; 19, identifier:model_numbers_names; 20, call; 21, attribute; 22, argument_list; 23, call; 24, for_in_clause; 25, identifier:sorted; 26, argument_list; 27, identifier:gfile; 28, identifier:Glob; 29, call; 30, attribute; 31, argument_list; 32, identifier:m; 33, identifier:all_models; 34, list_comprehension; 35, attribute; 36, argument_list; 37, attribute; 38, identifier:basename; 39, identifier:m; 40, tuple; 41, for_in_clause; 42, attribute; 43, identifier:join; 44, call; 45, string; 46, identifier:os; 47, identifier:path; 48, call; 49, call; 50, identifier:m; 51, identifier:model_filenames; 52, identifier:os; 53, identifier:path; 54, identifier:models_dir; 55, argument_list; 56, string_content:*.meta; 57, attribute; 58, argument_list; 59, attribute; 60, argument_list; 61, identifier:shipname; 62, identifier:detect_model_num; 63, identifier:m; 64, identifier:shipname; 65, identifier:detect_model_name; 66, identifier:m
code: def get_models():
      """Finds all models, returning a list of model number and names
      sorted increasing.
  
      Returns: [(13, 000013-modelname), (17, 000017-modelname), ...etc]
      """
      all_models = gfile.Glob(os.path.join(models_dir(), '*.meta'))
      model_filenames = [os.path.basename(m) for m in all_models]
      model_numbers_names = sorted([
          (shipname.detect_model_num(m), shipname.detect_model_name(m))
          for m in model_filenames])
      return model_numbers_names