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