def get_service_port(
        self,
        service_name: Optional[str] = None,
        port: Optional[int] = None,
    ):
        """
        Returns the mapped port for one of the services.

        Parameters
        ----------
        service_name: str
            Name of the docker compose service
        port: int
            The internal port to get the mapping for

        Returns
        -------
        str:
            The mapped port on the host
        """
        return self.get_container(service_name).get_publisher(by_port=port).normalize().PublishedPort

        Returns the mapped port for one of the services.

        Parameters
        ----------
        service_name: str
            Name of the docker compose service
        port: int
            The internal port to get the mapping for

        Returns
        -------
        str:
            The mapped port on the host
        
core/testcontainers/compose/compose.py