code: def test_read_write_bytes_lines(self, tmpdir, doc_en):
      expected = [utils.to_bytes(sent.text) for sent in doc_en.sents]
      for ext in (".txt", ".gz", ".bz2", ".xz"):
          filepath = str(
              tmpdir.join("test_read_write_file_lines_bytes" + ext)
          )
          io.write_text(
              expected, filepath, mode="wb", make_dirs=True, lines=True
          )
          observed = [
              line.strip()
              for line in io.read_text(filepath, mode="rb", lines=True)
          ]
          assert observed == expected
  
imports: import os
  import tarfile
  import zipfile
  import numpy
  import pytest
  from scipy import sparse
  from textacy import io, utils
label_desc: Use image node_id 3 for calling the TestTextIO obj's underlying member method code with example usage: obj.test_read_write_bytes_lines(tmpdir, doc_en) without return types