code: def create_gre_transport_endpoint(cls, endpoint, tunnel_interface=None):
          
          tunnel_interface = tunnel_interface.href if tunnel_interface else None
          return TunnelEndpoint(
              endpoint_ref=endpoint.href,
              tunnel_interface_ref=tunnel_interface)
docs: Create the GRE transport mode endpoint. If the GRE transport mode
          endpoint is an SMC managed device, both an endpoint and a tunnel
          interface is required. If the GRE endpoint is an externally managed
          device, only an endpoint is required.
          
          :param InternalEndpoint,ExternalEndpoint endpoint: the endpoint
              element for this tunnel endpoint.
          :param TunnelInterface tunnel_interface: the tunnel interface for
              this tunnel endpoint. Required for SMC managed devices.
          :rtype: TunnelEndpoint