code: def from_np(f, *args):
      def wrap(*args):
          new = [
              th.from_numpy(x) if isinstance(x, np.ndarray) else x
              for x in args
          ]
          return f(*new)
  
      return wrap
  
file_path: dgl/examples/pytorch/line_graph/train.py
imports: from __future__ import division
  import argparse
  import time
  from itertools import permutations
  import gnn
  import numpy
  import torch
  import torch.nn.functional
  import torch.optim
  from dgl.data import SBMMixtureDataset
  from torch.utils.data import DataLoader
label_desc: Use image node_id 2 for calling a global function with example usage: from_np(f) and returns: wrap, f