code: def attach(self, **kwargs):
          
          return self.client.api.attach(self.id, **kwargs)
docs: Attach to this container.
  
          :py:meth:`logs` is a wrapper around this method, which you can
          use instead if you want to fetch/stream container output without first
          retrieving the entire backlog.
  
          Args:
              stdout (bool): Include stdout.
              stderr (bool): Include stderr.
              stream (bool): Return container output progressively as an iterator
                  of strings, rather than a single string.
              logs (bool): Include the container's previous output.
  
          Returns:
              By default, the container's output as a single string.
  
              If ``stream=True``, an iterator of output strings.
  
          Raises:
              :py:class:`docker.errors.APIError`
                  If the server returns an error.