code: def generate_mask(dataset_path, radio=0.8):
      G = load_graph(
          os.path.join(dataset_path, "graph.edgelist"),
          os.path.join(dataset_path, "label.txt"),
      )
      labels = nx.get_node_attributes(G, "label")
      l = np.random.permutation(list(labels.keys()))
      n = int(radio * len(l))
      with open(
          os.path.join(dataset_path, "label_mask_train"), "w"
      ) as f:
          for i in l[:n]:
              print(i, file=f)
      with open(
          os.path.join(dataset_path, "label_mask_test"), "w"
      ) as f:
          for i in l[n:]:
              print(i, file=f)
  
imports: import random
  import os
  import sys
  import collections
  import itertools
  import pickle
  import scipy.sparse
  import networkx
  import numpy
  from sklearn.cluster import SpectralClustering
  from sklearn import gaussian_process
  from scipy.optimize import minimize
  from bayes_opt import BayesianOptimization
label_desc: Use image node_id 5 for calling a global function with example usage: generate_mask(dataset_path, radio) without return types