code: def update(self, mem, momentum, ind, time, interp=False):
      if self.num_gpus > 1:
          mem, ind, time = du.all_gather([mem, ind, time])
      mem = mem.view(mem.size(0), -1)
      ind, time = ind.long(), time.long()
  
      mem_old = self.get(ind, time, interp=interp)
      mem_update = mem_old * (1 - momentum) + mem * momentum
      mem_update = self.l2_norm(mem_update)
  
      self.memory.index_copy_(0, ind, mem_update)
      return
  
imports: import math
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import slowfast.models.losses
  import slowfast.utils.distributed
  import slowfast.utils.logging
  from slowfast.models.video_model_builder import X3D, MViT, ResNet, SlowFast
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 3 for calling the Memory1D obj's underlying member method code with example usage: obj.update(mem, momentum, ind, time, interp) without return types