code: def _gen_addr_creds(socket_type, tempdir):
      if socket_type == "uds":
          addr = f"unix://{tempdir}/server.sock"
          server_creds = grpc.local_server_credentials(
              grpc.LocalConnectionType.UDS
          )
          channel_creds = grpc.local_channel_credentials(
              grpc.LocalConnectionType.UDS
          )
      elif socket_type == "local_tcp":
          addr = "127.0.0.1:5432"
          server_creds = grpc.local_server_credentials(
              grpc.LocalConnectionType.LOCAL_TCP
          )
          channel_creds = grpc.local_channel_credentials(
              grpc.LocalConnectionType.LOCAL_TCP
          )
      else:
          raise NotImplementedError(
              f"Not supported socket type ({socket_type})"
          )
  
      return addr, server_creds, channel_creds
  
file_path: ray/python/ray/serve/_private/benchmarks/streaming/streaming_grpc_throughput.py
imports: import asyncio
  import logging
  import time
  from concurrent import futures
  from tempfile import TemporaryDirectory
  import click
  import grpc
  import ray
  from ray.serve._private.benchmarks.streaming._grpc import test_server_pb2, test_server_pb2_grpc
  from ray.serve._private.benchmarks.streaming._grpc.grpc_server import TestGRPCServer
  from ray.serve._private.benchmarks.streaming.common import Caller, IOMode
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_addr_creds(socket_type, tempdir) and returns: addr,  server_creds,  channel_creds