code: def __init__(self, config, graph, **kwargs):
      self.config = config
      self.graph = graph
      self.rank = kwargs.get("rank", 0)
      self.nrank = kwargs.get("nrank", 1)
      self.kwargs = kwargs
      self.edge_types = self.graph.get_edge_types()
      self.sample_num_list = kwargs.get(
          "sample_list", self.config.sample_num_list
      )
      log.info("sample_num_list is %s" % repr(self.sample_num_list))
  
imports: import os
  import re
  import sys
  import time
  import warnings
  import numpy
  from collections import defaultdict
  import pgl
  from pgl.utils.logger import log
  from pgl.distributed import DistGraphClient, DistGraphServer
  from utils.config import prepare_config
  from datasets.helper import stream_shuffle_generator, AsynchronousGenerator
  from datasets.node import NodeGenerator
  import datasets.sampling
label_desc: Use image node_id 1 to create a new EgoGraphGenerator object from inherited base classes: object with example: obj = EgoGraphGenerator(config, graph)