code: def batch_iter(self):
      look_up = self.g.look_up_dict
  
      table_size = 1e8
      numNodes = self.node_size
  
      edges = [(look_up[x[0]], look_up[x[1]]) for x in self.g.G.edges()]
  
      data_size = self.g.G.number_of_edges()
      edge_set = set([x[0] * numNodes + x[1] for x in edges])
      shuffle_indices = np.random.permutation(np.arange(data_size))
  
      # positive or negative mod
      mod = 0
      mod_size = 1 + self.negative_ratio
      h = []
      t = []
      sign = 0
  
      start_index = 0
      end_index = min(start_index + self.batch_size, data_size)
      while start_index < data_size:
          if mod == 0:
              sign = 1.0
              h = []
              t = []
              for i in range(start_index, end_index):
                  if (
                      not random.random()
                      < self.edge_prob[shuffle_indices[i]]
                  ):
                      shuffle_indices[i] = self.edge_alias[
                          shuffle_indices[i]
                      ]
                  cur_h = edges[shuffle_indices[i]][0]
                  cur_t = edges[shuffle_indices[i]][1]
                  h.append(cur_h)
                  t.append(cur_t)
          else:
              sign = -1.0
              t = []
              for i in range(len(h)):
                  t.append(
                      self.sampling_table[
                          random.randint(0, table_size - 1)
                      ]
                  )
  
          yield h, t, [sign]
          mod += 1
          mod %= mod_size
          if mod == 0:
              start_index = end_index
              end_index = min(start_index + self.batch_size, data_size)
  
imports: from __future__ import print_function
  import random
  import math
  import numpy
  from sklearn.linear_model import LogisticRegression
  import tensorflow
  from .classify import Classifier, read_node_label
label_desc: Use image node_id 4 for calling the _LINE obj's underlying member method code with example usage: obj.batch_iter() without return types