code: def disconnect(self, container, *args, **kwargs):
          
          if isinstance(container, Container):
              container = container.id
          return self.client.api.disconnect_container_from_network(
              container, self.id, *args, **kwargs
          )
docs: Disconnect a container from this network.
  
          Args:
              container (str): Container to disconnect from this network, as
                  either an ID, name, or
                  :py:class:`~docker.models.containers.Container` object.
              force (bool): Force the container to disconnect from a network.
                  Default: ``False``
  
          Raises:
              :py:class:`docker.errors.APIError`
                  If the server returns an error.