code: def _create_mock_client():
      # Create a stub instance (using a test channel) in order to derive a mock
      # from it with autospec enabled. Mocking TensorBoardWriterServiceStub itself
      # doesn't work with autospec because grpc constructs stubs via metaclassing.
      test_channel = grpc_testing.channel(
          service_descriptors=[], time=grpc_testing.strict_real_time()
      )
      stub = data_provider_pb2_grpc.TensorBoardDataProviderStub(
          test_channel
      )
      return mock.create_autospec(stub)
  
imports: from unittest import mock
  import grpc
  import grpc_testing
  import numpy
  from tensorboard import errors
  from tensorboard import test
  from tensorboard import context
  from tensorboard.data import grpc_provider
  from tensorboard.data import provider
  from tensorboard.data.proto import data_provider_pb2
  from tensorboard.data.proto import data_provider_pb2_grpc
  from tensorboard.util import tensor_util
label_desc: Use image node_id 1 for calling a global function with example usage: _create_mock_client() and returns: mock