code: def sample_mask(idx, l):
      """Create mask."""
      mask = np.zeros(l)
      mask[idx] = 1
      return np.array(mask, dtype=np.bool)
  
file_path: OpenNE/src/openne/gcn/utils.py
imports: import numpy
  import pickle
  import networkx
  import scipy.sparse
  from scipy.sparse.linalg.eigen.arpack import eigsh
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: sample_mask(idx, l) and returns: np