code: def _split_diff(merge_result, context_lines=3):
      
      collect = []
      for item in _visible_in_diff(merge_result, context_lines=context_lines):
          if item is None:
              if collect:
                  yield collect
              collect = []
          else:
              collect.append(item)
docs: Split diffs and context lines into groups based on None sentinel