class_docstr: The abstract dist sparse optimizer.
  
  Note: dgl dist sparse optimizer only work with dgl.distributed.DistEmbedding
  
  Parameters
  ----------
  params : list of DistEmbedding
      The list of DistEmbedding.
  lr : float
      The learning rate.
code: def _get_local_ids(self, part_policy):
      if EDGE_PART_POLICY in part_policy.policy_str:
          return part_policy.partition_book.partid2eids(
              part_policy.part_id, part_policy.type_name
          )
      elif NODE_PART_POLICY in part_policy.policy_str:
          return part_policy._partition_book.partid2nids(
              part_policy.part_id, part_policy.type_name
          )
      else:
          raise RuntimeError(
              "Cannot support policy: %s " % part_policy.policy_str
          )
  
imports: import abc
  import warnings
  from abc import abstractmethod
  from os.path import exists
  import torch
  import dgl
  from ....None import backend
  from ...dist_tensor import DistTensor
  from ...graph_partition_book import EDGE_PART_POLICY, NODE_PART_POLICY
  from ...nn.pytorch import DistEmbedding
  from .utils import alltoall, alltoallv
label_desc: Use image node_id 7 for calling the DistSparseGradOptimizer obj's underlying member method code with example usage: obj._get_local_ids(part_policy) and returns: part_policy, part_policy