code: def test_max_char_batching(self, tmp):
      it = file_tail_iterator(tmp)
      assert next(it) is None
  
      f = open(tmp, "w")
  
      # Write a single line that is over 60000 characters,
      # check we get it in batches of 20000
      f.write(f"{'1234567890' * 6000}\n")
      f.flush()
  
      assert next(it) == ["1234567890" * 2000]
      assert next(it) == ["1234567890" * 2000]
      assert next(it) == ["1234567890" * 2000]
      assert next(it) == ["\n"]
      assert next(it) is None
  
      # Write a 10 lines where last line is over 20000 characters,
      # check we get it in batches of 20000
      for i in range(9):
          f.write(f"{i}\n")
      f.write(f"{'1234567890' * 2000}\n")
      f.flush()
  
      first_nine_lines = [f"{i}\n" for i in range(9)]
      first_nine_lines_length = sum(
          len(line) for line in first_nine_lines
      )
      assert next(it) == first_nine_lines + [
          f"{'1234567890' * 2000}"[0:-first_nine_lines_length]
      ]
      # Remainder of last line
      assert next(it) == [
          f"{'1234567890' * 2000}"[-first_nine_lines_length:] + "\n"
      ]
      assert next(it) is None
  
file_path: ray/python/ray/dashboard/modules/job/tests/test_utils.py
imports: from tempfile import NamedTemporaryFile
  import sys
  import pytest
  from ray.dashboard.modules.job.common import JobSubmitRequest
  from ray.dashboard.modules.job.utils import file_tail_iterator, strip_keys_with_value_none, parse_and_validate_request, redact_url_password
label_desc: Use image node_id 7 for calling the TestIterLine obj's underlying member method code with example usage: obj.test_max_char_batching(tmp) without return types