class_docstr: MNISTDigitClassifier handler class. This handler extends class ImageClassifier from image_classifier.py, a
  default handler. This handler takes an image and returns the number in that image.
code: def initialize(self, context):
      super().initialize(context)
      metrics = context.metrics
  
      # "add_metric_to_cache" will only register/override(if already present) a metric object in the metric cache and will not emit it
      self.inf_request_count = metrics.add_metric_to_cache(
          metric_name="InferenceRequestCount",
          unit="count",
          dimension_names=[],
          metric_type=MetricTypes.COUNTER,
      )
      metrics.add_metric_to_cache(
          metric_name="PreprocessCallCount",
          unit="count",
          dimension_names=["ModelName"],
          metric_type=MetricTypes.COUNTER,
      )
  
      # "add_metric" will register the metric if not already present in metric cache,
      # include the "ModelName" and "Level" dimensions by default and emit it
      metrics.add_metric(
          name="InitializeCallCount",
          value=1,
          unit="count",
          metric_type=MetricTypes.COUNTER,
      )
  
file_path: serve/examples/custom_metrics/mnist_handler.py
imports: import time
  from torchvision import transforms
  from ts.metrics.dimension import Dimension
  from ts.metrics.metric_type_enum import MetricTypes
  from ts.torch_handler.image_classifier import ImageClassifier
label_desc: Use image node_id 1 for calling the MNISTDigitClassifier obj's underlying member method code with example usage: obj.initialize(context) without return types