code: def remove_self_loops(edge_index: np.ndarray) -> np.ndarray:
      """Removes self-loops from a given set of edges
  
      Parameters
      ----------
      edge_index: numpy.ndarray
          An numpy array of shape (2, |num_edges|) representing edges in a graph
      """
      mask = []
      for i in range(edge_index.shape[1]):
          if edge_index[0][i] != edge_index[1][i]:
              # not a self-loop
              mask.append(i)
      return edge_index[:, mask]
  
file_path: deepchem/deepchem/utils/fake_data_generator.py
imports: import random
  import numpy
  from deepchem.data import NumpyDataset
  from deepchem.feat import GraphData
label_desc: Use image node_id 2 for calling a global function with example usage: remove_self_loops(edge_index) and returns: edge_index