code: def update(self, latency):
      self.times.append(torch.Tensor([latency * 1000]).double())
  
imports: from typing import Any
  import torch
  import time
  from pytorch_lightning.callbacks import Callback
  from pytorch_lightning.loops.dataloader.evaluation_loop import EvaluationLoop
  from bigdl.nano.utils.common import invalidInputError
  from collections import ChainMap
  from torchmetrics import Metric
label_desc: Use image node_id 2 for calling the LatencyAggregate obj's underlying member method code with example usage: obj.update(latency) without return types