def port(self, container_id: str, port: int) -> str:
        """
        Lookup the public-facing port that is NAT-ed to :code:`port`.
        """
        port_mappings = self.client.api.port(container_id, port)
        if not port_mappings:
            raise ConnectionError(f"Port mapping for container {container_id} and port {port} is not available")
        return cast(str, port_mappings[0]["HostPort"])

        Lookup the public-facing port that is NAT-ed to :code:`port`.
        
core/testcontainers/core/docker_client.py