code: def wrap(cls, meth):
          '''
          Wraps a connection opening method in this class.
          '''
  
          async def inner(*args, **kwargs):
              sock = await meth(*args, **kwargs)
              return cls(sock)
  
          return innef wrap(cls, meth):
          '''
          Wraps a connection opening method in this class.
          '''
  
          async def inner(*args, **kwargs):
              sock = await meth(*args, **kwargs)
              return cls(sock)
  
          return inner
docs: Wraps a connection opening method in this class.