code: def replace_ent(x, ent, V):
      # replace the entity
      mask = x >= V
      if mask.sum() == 0:
          return x
      nz = mask.nonzero()
      fill_ent = ent[nz, x[mask] - V]
      x = x.masked_scatter(mask, fill_ent)
      return x
  
imports: import json
  import pickle
  import random
  import dgl
  import numpy
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: replace_ent(x, ent, V) and returns: x, x