code: def _check_splitting_endings_separator(
      endings: list[str],
      separator: Optional[str] = None,
      keep_ends: bool = False,
      check_continuation: bool = False,
  ) -> None:
      for line_ending in endings:
          line_splitter = LineSplitter(
              separator=separator, keep_ends=keep_ends
          )
          full_end = (
              line_ending + separator if separator else line_ending
          )
          if separator:
              expected_end = full_end if keep_ends else line_ending
          else:
              expected_end = line_ending if keep_ends else ""
  
          lines = line_splitter.process(
              full_end.join(test_lines)
              + full_end
              + ("fourth " if check_continuation else "")
          )
          assert_equal(
              lines, [line + expected_end for line in test_lines]
          )
  
          if check_continuation:
              assert_equal(line_splitter.remaining_data, "fourth ")
              lines = line_splitter.process("line" + full_end)
              assert_equal(lines, ["fourth line" + expected_end])
              assert_is_none(line_splitter.finish_processing())
          else:
              assert_is_none(line_splitter.finish_processing())
  
file_path: datalad/datalad/runner/tests/test_utils.py
imports: from __future__ import annotations
  from typing import Optional
  from unittest.mock import call, patch
  from datalad.tests.utils_pytest import assert_equal, assert_in, assert_is_none
  from ..utils import AssemblingDecoderMixIn, LineSplitter
label_desc: Use image node_id 1 for calling a global function with example usage: _check_splitting_endings_separator(endings, separator, keep_ends, check_continuation) without return types