code: def test_read_last_scalars(self):
      tag1 = data_provider_pb2.ReadScalarsResponse.TagEntry(
          tag_name="tag1",
          data=data_provider_pb2.ScalarData(
              step=[10000], wall_time=[1234.0], value=[1]
          ),
      )
      tag2 = data_provider_pb2.ReadScalarsResponse.TagEntry(
          tag_name="tag2",
          data=data_provider_pb2.ScalarData(
              step=[10000], wall_time=[1235.0], value=[0.50]
          ),
      )
      run1 = data_provider_pb2.ReadScalarsResponse.RunEntry(
          run_name="run1", tags=[tag1]
      )
      run2 = data_provider_pb2.ReadScalarsResponse.RunEntry(
          run_name="run2", tags=[tag2]
      )
      res = data_provider_pb2.ReadScalarsResponse(runs=[run1, run2])
      self.stub.ReadScalars.return_value = res
  
      actual = self.provider.read_last_scalars(
          self.ctx,
          experiment_id="123",
          plugin_name="scalars",
          run_tag_filter=provider.RunTagFilter(
              runs=["train", "test", "nope"]
          ),
      )
      expected = {
          "run1": {
              "tag1": provider.ScalarDatum(
                  step=10000, wall_time=1234.0, value=1
              ),
          },
          "run2": {
              "tag2": provider.ScalarDatum(
                  step=10000, wall_time=1235.0, value=0.50
              ),
          },
      }
  
      self.assertEqual(actual, expected)
  
      expected_req = data_provider_pb2.ReadScalarsRequest(
          experiment_id="123",
          plugin_filter=data_provider_pb2.PluginFilter(
              plugin_name="scalars"
          ),
          run_tag_filter=data_provider_pb2.RunTagFilter(
              runs=data_provider_pb2.RunFilter(
                  names=["nope", "test", "train"]  # sorted
              )
          ),
          downsample=data_provider_pb2.Downsample(num_points=1),
      )
      self.stub.ReadScalars.assert_called_once_with(expected_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 9 for calling the GrpcDataProviderTest obj's underlying member method code with example usage: obj.test_read_last_scalars() without return types