class_docstr: Flickr dataset implementation
  
  Args:
      name: The name of the dataset.
  
      symmetry_edges: Whether to create symmetry edges.
  
      self_loop:  Whether to contain self loop edges.
  
      train_percentage: The percentage of nodes to be trained in multi class task.
  
  Attributes:
      graph: The :code:`Graph` data object.
  
      num_groups: Number of classes.
  
      train_index: The index for nodes in training set.
  
      test_index: The index for nodes in validation set.
docstr: Fetch batch data from dataset.
          
docstr_tok: ["Fetch","batch","data","from","dataset","."]
code: def fetch_batch(
      self,
      batch_size=16,
      K=10,
      edge_sampling="alias",
      node_sampling="alias",
  ):
      """Fetch batch data from dataset."""
      if edge_sampling == "numpy":
          edge_batch_index = np.random.choice(
              self.graph.num_edges,
              size=batch_size,
              p=self.edge_distribution,
          )
      elif edge_sampling == "alias":
          edge_batch_index = self.edge_sampling.sampling(batch_size)
      elif edge_sampling == "uniform":
          edge_batch_index = np.random.randint(
              0, self.graph.num_edges, size=batch_size
          )
      u_i = []
      u_j = []
      label = []
      for edge_index in edge_batch_index:
          edge = self.graph.edges[edge_index]
          u_i.append(edge[0])
          u_j.append(edge[1])
          label.append(1)
          for i in range(K):
              while True:
                  if node_sampling == "numpy":
                      negative_node = np.random.choice(
                          self.graph.num_nodes,
                          p=self.node_negative_distribution,
                      )
                  elif node_sampling == "alias":
                      negative_node = self.node_sampling.sampling()
                  elif node_sampling == "uniform":
                      negative_node = np.random.randint(
                          0, self.graph.num_nodes
                      )
  
                  # make sure the sampled node has no edge with the source node
                  if not self.graph.has_edges_between(
                      np.array(
                          [self.node_index_reversed[negative_node]]
                      ),
                      np.array([self.node_index_reversed[edge[0]]]),
                  ):
                      break
              u_i.append(edge[0])
              u_j.append(negative_node)
              label.append(-1)
      u_i = np.array([u_i], dtype=np.int64).T
      u_j = np.array([u_j], dtype=np.int64).T
      label = np.array(label, dtype=np.float32)
      return u_i, u_j, label
  
file_path: PGL/legacy/examples/line/data_loader.py
imports: import os
  import io
  import sys
  import numpy
  from pgl import graph
  from pgl.utils.logger import log
label_desc: Use image node_id 3 for calling the FlickrDataset obj's underlying member method code with example usage: obj.fetch_batch(batch_size, K, edge_sampling, node_sampling) and returns: u_i,  u_j,  label