class_docstr: The abstract sparse optimizer.
  
  Note: dgl sparse optimizer only work with dgl.NodeEmbedding
  
  Parameters
  ----------
  params : list of NodeEmbedding
      The list of NodeEmbeddings.
  lr : float
      The learning rate.
docstr: This is function where subclasses can perform any setup they need
  to. It will be called during the first step, and communicators or
  shared memory will have been setup before this call.
  
  Parameters
  ----------
  params : list of NodeEmbedding
      The list of NodeEmbeddings.
docstr_tok: ["This","is","function","where","subclasses","can","perform","any","setup","they","need","to",".","It","will","be","called","during","the","first","step",",","and","communicators","or","shared","memory","will","have","been","setup","before","this","call",".","Parameters","--","--","--","--","--","params",":","list","of","NodeEmbedding","The","list","of","NodeEmbeddings","."]
code: def setup(self, params):
      """This is function where subclasses can perform any setup they need
      to. It will be called during the first step, and communicators or
      shared memory will have been setup before this call.
  
      Parameters
      ----------
      params : list of NodeEmbedding
          The list of NodeEmbeddings.
      """
  
imports: import abc
  from abc import abstractmethod
  import torch
  from ...cuda import nccl
  from ...nn.pytorch import NodeEmbedding
  from ...partition import NDArrayPartition
  from ...utils import create_shared_mem_array, gather_pinned_tensor_rows, get_shared_mem_array, pin_memory_inplace, scatter_pinned_tensor_rows
label_desc: Use image node_id 3 for calling the SparseGradOptimizer obj's underlying member method code with example usage: obj.setup(params) without return types