code: def test_writelines(self):
      writer = mock.Mock()
  
      class MyTransport(asyncio.Transport):
          def write(self, data):
              writer(data)
  
      transport = MyTransport()
  
      transport.writelines(
          [b"line1", bytearray(b"line2"), memoryview(b"line3")]
      )
      self.assertEqual(1, writer.call_count)
      writer.assert_called_with(b"line1line2line3")
  
file_path: cpython/Lib/test/test_asyncio/test_transports.py
imports: import unittest
  from unittest import mock
  import asyncio
  from asyncio import transports
label_desc: Use image node_id 3 for calling the TransportTests obj's underlying member method code with example usage: obj.test_writelines() without return types