code: def for_container(cls, container, container_port=None):
          
          if container_port is not None:
              host, port = container.get_host_port(container_port)
          else:
              host, port = container.get_first_host_port()
  
          return cls(host, port)
docs: :param container:
              The container to make requests against.
          :param container_port:
              The container port to make requests against. If ``None``, the first
              container port is used.
          :returns:
              A ContainerClient object configured to make requests to the
              container.