code: def test_read_tensors(self):
      res = data_provider_pb2.ReadTensorsResponse()
      run = res.runs.add(run_name="test")
      tag = run.tags.add(tag_name="weights")
      tag.data.step.extend([0, 1, 2])
      tag.data.wall_time.extend([1234.0, 1235.0, 1236.0])
      tag.data.value.append(
          tensor_util.make_tensor_proto([0.0, 0.0, 42.0])
      )
      tag.data.value.append(
          tensor_util.make_tensor_proto([1.0, 1.0, 43.0])
      )
      tag.data.value.append(
          tensor_util.make_tensor_proto([2.0, 2.0, 44.0])
      )
      self.stub.ReadTensors.return_value = res
  
      actual = self.provider.read_tensors(
          self.ctx,
          experiment_id="123",
          plugin_name="histograms",
          run_tag_filter=provider.RunTagFilter(runs=["test", "nope"]),
          downsample=3,
      )
      expected = {
          "test": {
              "weights": [
                  provider.TensorDatum(
                      step=0,
                      wall_time=1234.0,
                      numpy=np.array([0.0, 0.0, 42.0]),
                  ),
                  provider.TensorDatum(
                      step=1,
                      wall_time=1235.0,
                      numpy=np.array([1.0, 1.0, 43.0]),
                  ),
                  provider.TensorDatum(
                      step=2,
                      wall_time=1236.0,
                      numpy=np.array([2.0, 2.0, 44.0]),
                  ),
              ],
          },
      }
      self.assertEqual(actual, expected)
  
      req = data_provider_pb2.ReadTensorsRequest()
      req.experiment_id = "123"
      req.plugin_filter.plugin_name = "histograms"
      req.run_tag_filter.runs.names.extend(["nope", "test"])  # sorted
      req.downsample.num_points = 3
      self.stub.ReadTensors.assert_called_once_with(req)
  
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 11 for calling the GrpcDataProviderTest obj's underlying member method code with example usage: obj.test_read_tensors() without return types