code: def update(self, **kwargs):
      for k, v in kwargs.items():
          if isinstance(v, torch.Tensor):
              v = v.item()
          assert isinstance(v, (float, int))
          self.meters[k].update(v)
  
imports: from collections import defaultdict, deque
  import datetime
  import pickle
  import time
  import errno
  import os
  from contextlib import contextmanager
  import torch
  import torch.distributed
label_desc: Use image node_id 2 for calling the MetricLogger obj's underlying member method code with example usage: obj.update() without return types