code: def _split_match_steps_into_match_traversals(match_steps):
      
      output = []
      current_list = None
      for step in match_steps:
          if isinstance(step.root_block, QueryRoot):
              if current_list is not None:
                  output.append(current_list)
              current_list = [step]
          else:
              current_list.append(step)
  
      if current_list is None:
          raise AssertionError(u'current_list was unexpectedly None: {}'.format(match_steps))
      output.append(current_list)
  
      return output
docs: Split a list of MatchSteps into multiple lists, each denoting a single MATCH traversal.