code: def share_memory(self):
      for group in self.param_groups:
          for p in group["params"]:
              state = self.state[p]
              state["acc"].share_memory_()
              if group["momentum"] > 0:
                  state["mom"].share_memory_()
  
imports: from collections import Counter
  import numpy
  import torch
  from torch import nn
  from torch.autograd import Variable
  from torch.optim import Optimizer
  from cornac.utils.common import get_rng
label_desc: Use image node_id 2 for calling the IndexedAdagradM obj's underlying member method code with example usage: obj.share_memory() without return types