docs: def sockets(self):
          """
          Returns a tuple of sockets connected to the pty (stdin,stdout,stderr).
  
          If any of the sockets are not attached in the container, `None` is
          returned in the tuple.
          """
  
          info = self._container_info()
  
          def attach_socket(key):
              if info['Config']['Attach{0}'.format(key.capitalize())]:
                  socket = self.client.attach_socket(
                      self.container,
                      {key: 1, 'stream': 1, 'logs': self.logs},
                  )
                  stream = io.Stream(socket)
  
                  if info['Config']['Tty']:
                      return stream
                  else:
                      return io.Demuxer(stream)
              else:
                  return None
  
          return map(attach_socket, ('stdin', 'stdout', 'stderr'))