nodes: 0, module; 1, function_definition; 2, function_name:_get_all_migrations; 3, parameters; 4, block; 5, expression_statement; 6, import_from_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, expression_statement; 12, return_statement; 13, comment:""" Returns sorted list of all migrations.
  
      Returns:
          list of (int, str) tuples: first elem of the tuple is migration number, second if module name.
  
      """; 14, relative_import; 15, dotted_name; 16, assignment; 17, assignment; 18, assignment; 19, pattern_list; 20, call; 21, block; 22, assignment; 23, identifier:all_migrations; 24, import_prefix; 25, identifier:migrations; 26, identifier:package; 27, identifier:migrations; 28, identifier:prefix; 29, binary_operator:package.__name__ + '.'; 30, identifier:all_migrations; 31, list; 32, identifier:importer; 33, identifier:modname; 34, identifier:ispkg; 35, attribute; 36, argument_list; 37, expression_statement; 38, expression_statement; 39, identifier:all_migrations; 40, call; 41, attribute; 42, string; 43, identifier:pkgutil; 44, identifier:iter_modules; 45, attribute; 46, identifier:prefix; 47, assignment; 48, call; 49, identifier:sorted; 50, argument_list; 51, identifier:package; 52, identifier:__name__; 53, string_content:.; 54, identifier:package; 55, identifier:__path__; 56, identifier:version; 57, call; 58, attribute; 59, argument_list; 60, identifier:all_migrations; 61, keyword_argument; 62, identifier:int; 63, argument_list; 64, identifier:all_migrations; 65, identifier:append; 66, tuple; 67, identifier:key; 68, lambda; 69, subscript; 70, identifier:version; 71, identifier:modname; 72, lambda_parameters; 73, subscript; 74, call; 75, integer:0; 76, identifier:x; 77, identifier:x; 78, integer:0; 79, attribute; 80, argument_list; 81, subscript; 82, identifier:split; 83, string; 84, call; 85, unary_operator; 86, string_content:_; 87, attribute; 88, argument_list; 89, integer:1; 90, identifier:modname; 91, identifier:split; 92, string; 93, string_content:.
code: def _get_all_migrations():
      """ Returns sorted list of all migrations.
  
      Returns:
          list of (int, str) tuples: first elem of the tuple is migration number, second if module name.
  
      """
      from . import migrations
  
      package = migrations
      prefix = package.__name__ + '.'
      all_migrations = []
      for importer, modname, ispkg in pkgutil.iter_modules(package.__path__, prefix):
          version = int(modname.split('.')[-1].split('_')[0])
          all_migrations.append((version, modname))
  
      all_migrations = sorted(all_migrations, key=lambda x: x[0])
      return all_migrations