code: def prepare_socksendfile(self):
      proto = MyProto(self.loop)
      port = socket_helper.find_unused_port()
      srv_sock = self.make_socket(cleanup=False)
      srv_sock.bind((socket_helper.HOST, port))
      server = self.run_loop(
          self.loop.create_server(lambda: proto, sock=srv_sock)
      )
      self.reduce_receive_buffer_size(srv_sock)
  
      sock = self.make_socket()
      self.run_loop(self.loop.sock_connect(sock, ("127.0.0.1", port)))
      self.reduce_send_buffer_size(sock)
  
      def cleanup():
          if proto.transport is not None:
              # can be None if the task was cancelled before
              # connection_made callback
              proto.transport.close()
              self.run_loop(proto.wait_closed())
  
          server.close()
          self.run_loop(server.wait_closed())
  
      self.addCleanup(cleanup)
  
      return sock, proto
  
imports: import asyncio
  import errno
  import os
  import socket
  import sys
  import tempfile
  import unittest
  from asyncio import base_events
  from asyncio import constants
  from unittest import mock
  from test import support
  from test.support import os_helper
  from test.support import socket_helper
  from test.test_asyncio import utils
label_desc: Use image node_id 6 for calling the SockSendfileMixin obj's underlying member method code with example usage: obj.prepare_socksendfile() and returns: sock,  proto