class_docstr: This minibatch iterator iterates over batches of sampled edges or
  random pairs of co-occuring edges.
  
  G -- networkx graph
  id2idx -- dict mapping node ids to index in feature tensor
  placeholders -- tensorflow placeholders object
  context_pairs -- if not none, then a list of co-occuring node pairs (from random walks)
  batch_size -- size of the minibatches
  max_degree -- maximum size of the downsampled adjacency lists
  n2v_retrain -- signals that the iterator is being used to add new embeddings to a n2v model
  fixed_n2v -- signals that the iterator is being used to retrain n2v with only existing nodes as context
class_docstr_tok: ["This","minibatch","iterator","iterates","over","batches","of","sampled","edges","or","random","pairs","of","co-occuring","edges",".","G","--","networkx","graph","id2idx","--","dict","mapping","node","ids","to","index","in","feature","tensor","placeholders","--","tensorflow","placeholders","object","context_pairs","--","if","not","none",",","then","a","list","of","co-occuring","node","pairs","(","from","random","walks",")","batch_size","--","size","of","the","minibatches","max_degree","--","maximum","size","of","the","downsampled","adjacency","lists","n2v_retrain","--","signals","that","the","iterator","is","being","used","to","add","new","embeddings","to","a","n2v","model","fixed_n2v","--","signals","that","the","iterator","is","being","used","to","retrain","n2v","with","only","existing","nodes","as","context"]
code: def construct_test_adj(self):
      adj = len(self.id2idx) * np.ones(
          (len(self.id2idx) + 1, self.max_degree)
      )
      for nodeid in self.G.nodes():
          neighbors = np.array(
              [
                  self.id2idx[neighbor]
                  for neighbor in self.G.neighbors(nodeid)
              ]
          )
          if len(neighbors) == 0:
              continue
          if len(neighbors) > self.max_degree:
              neighbors = np.random.choice(
                  neighbors, self.max_degree, replace=False
              )
          elif len(neighbors) < self.max_degree:
              neighbors = np.random.choice(
                  neighbors, self.max_degree, replace=True
              )
          adj[self.id2idx[nodeid], :] = neighbors
      return adj
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
label_desc: Use image node_id 5 for calling the EdgeMinibatchIterator obj's underlying member method code with example usage: obj.construct_test_adj() and returns: adj