code: def read_cmap_data(path, nxG=None):
      knockout_nodes = set()
      if nxG is None:
          nxG = nx.DiGraph()
      with open(path, newline="") as csvfile:
          reader = csv.reader(
              csvfile, delimiter=",", quoting=csv.QUOTE_NONNUMERIC
          )
          next(reader)
          prev_exp_id = None
          skip_exp = False
          for row in reader:
              # assumes that experiment ids are consecutive in csv
              # remove experiment on the same knockout gene
              if not row[3] == prev_exp_id:
                  # encounter new experiment
                  prev_exp_id = row[3]
                  if row[0] in knockout_nodes:
                      skip_exp = True
                      continue
                  else:
                      skip_exp = False
                      knockout_nodes.add(row[0])
              else:
                  # continue current experiment
                  if skip_exp:
                      continue
              if row[2] == -1:
                  de = 0
              elif row[2] == 1:
                  de = 1
              nxG.add_edge(
                  row[0],
                  row[1],
                  edge_type=1,
                  edge_de=de,
                  edge_dose=row[4],
                  edge_pert_time=row[5],
              )
  
      return nxG, knockout_nodes
  
imports: import argparse
  import copy
  import csv
  import numpy
  import time
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.utils.tensorboard import SummaryWriter
  import networkx
  import numpy
  import sklearn.metrics
  import torch_geometric.transforms
  import torch_geometric.nn
  from torch.utils.data import DataLoader
  from deepsnap.graph import Graph
  from deepsnap.dataset import GraphDataset
  from deepsnap.batch import Batch
label_desc: Use image node_id 6 for calling a global function with example usage: read_cmap_data(path, nxG) and returns: nxG,  knockout_nodes