def create_endpoint(service_name: str, *,
                    ipv4: OptStr = None,
                    ipv6: OptStr = None,
                    port: OptInt = None) -> Endpoint:
    """Factory function to create Endpoint object.
    """
    return Endpoint(service_name, ipv4, ipv6, port)
Factory function to create Endpoint object.