code: def test_create_connection_sock(self):
      with test_utils.run_test_server() as httpd:
          sock = None
          infos = self.loop.run_until_complete(
              self.loop.getaddrinfo(
                  *httpd.address, type=socket.SOCK_STREAM
              )
          )
          for family, type, proto, cname, address in infos:
              try:
                  sock = socket.socket(
                      family=family, type=type, proto=proto
                  )
                  sock.setblocking(False)
                  self.loop.run_until_complete(
                      self.loop.sock_connect(sock, address)
                  )
              except BaseException:
                  pass
              else:
                  break
          else:
              self.fail("Can not create socket.")
  
          f = self.loop.create_connection(
              lambda: MyProto(loop=self.loop), sock=sock
          )
          tr, pr = self.loop.run_until_complete(f)
          self.assertIsInstance(tr, asyncio.Transport)
          self.assertIsInstance(pr, asyncio.Protocol)
          self.loop.run_until_complete(pr.done)
          self.assertGreater(pr.nbytes, 0)
          tr.close()
  
imports: import socket
  import asyncio
  import sys
  import unittest
  from asyncio import proactor_events
  from itertools import cycle, islice
  from unittest.mock import Mock
  from test.test_asyncio import utils
  from test import support
  from test.support import socket_helper
label_desc: Use image node_id 18 for calling the BaseSockTestsMixin obj's underlying member method code with example usage: obj.test_create_connection_sock() without return types