code: def _gen_sampling_table(self):
      # create sampling table for vertex
      power = 0.75
      numNodes = self.node_size
      node_degree = np.zeros(numNodes)  # out degree
      node2idx = self.node2idx
  
      for edge in self.graph.edges():
          node_degree[node2idx[edge[0]]] += self.graph[edge[0]][
              edge[1]
          ].get("weight", 1.0)
  
      total_sum = sum(
          [math.pow(node_degree[i], power) for i in range(numNodes)]
      )
      norm_prob = [
          float(math.pow(node_degree[j], power)) / total_sum
          for j in range(numNodes)
      ]
  
      self.node_accept, self.node_alias = create_alias_table(norm_prob)
  
      # create sampling table for edge
      numEdges = self.graph.number_of_edges()
      total_sum = sum(
          [
              self.graph[edge[0]][edge[1]].get("weight", 1.0)
              for edge in self.graph.edges()
          ]
      )
      norm_prob = [
          self.graph[edge[0]][edge[1]].get("weight", 1.0)
          * numEdges
          / total_sum
          for edge in self.graph.edges()
      ]
  
      self.edge_accept, self.edge_alias = create_alias_table(norm_prob)
  
file_path: GraphEmbedding/ge/models/line.py
imports: import math
  import random
  import numpy
  from deepctr.layers.utils import reduce_sum
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.layers import Embedding, Input, Lambda
  from tensorflow.python.keras.models import Model
  from ..alias import create_alias_table, alias_sample
  from ..utils import preprocess_nxgraph
label_desc: Use image node_id 4 for calling the LINE obj's underlying member method code with example usage: obj._gen_sampling_table() without return types