code: def test_exported_rpc_api_static_factory(self):
      @eager_def_function.function(
          input_signature=[
              tensor_spec.TensorSpec([], dtypes.int32),
              tensor_spec.TensorSpec([], dtypes.int32),
          ]
      )
      def _remote_fn(a, b):
          return math_ops.multiply(a, b)
  
      port = portpicker.pick_unused_port()
      address = "localhost:{}".format(port)
      server_resource = rpc_ops.Server.create("grpc", address)
      server_resource.register("multiply", _remote_fn)
  
      server_resource.start()
      client = rpc_ops.Client.create(
          "grpc", address=address, name="test_client"
      )
  
      a = variables.Variable(2, dtype=dtypes.int32)
      b = variables.Variable(3, dtype=dtypes.int32)
  
      mul_or = client.call(
          args=[a, b],
          method_name="multiply",
          output_specs=tensor_spec.TensorSpec((), dtypes.int32),
      )
  
      self.assertAllEqual(mul_or.is_ok(), True)
      self.assertAllEqual(mul_or.get_value(), 6)
  
      # Test empty client name
      client1 = rpc_ops.Client.create("grpc", address)
      mul_or = client1.call(
          args=[a, b],
          method_name="multiply",
          output_specs=tensor_spec.TensorSpec((), dtypes.int32),
      )
      self.assertAllEqual(mul_or.is_ok(), True)
      self.assertAllEqual(mul_or.get_value(), 6)
  
      # Test without output_spec
      mul_or = client1.multiply(a, b)
      self.assertAllEqual(mul_or.is_ok(), True)
      self.assertAllEqual(mul_or.get_value(), 6)
  
      self.assertEqual(
          client1.multiply.__doc__,
          "RPC Call for multiply method to server " + address,
      )
  
imports: import threading
  import time
  import numpy
  import portpicker
  from tensorflow.python.distribute.experimental.rpc import rpc_ops
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling the RpcOpsTest obj's underlying member method code with example usage: obj.test_exported_rpc_api_static_factory() and returns: math_ops