code: def import_graph(
      hl_graph, model, args, input_names=None, verbose=False
  ):
      if args is None:
          args = [1, 3, 224, 224]  # assume ImageNet default
  
      # if args is not Tensor but is array like then convert it to torch tensor
      if (
          not isinstance(args, torch.Tensor)
          and hasattr(args, "__len__")
          and hasattr(args, "__getitem__")
          and not isinstance(args, (str, abc.ByteString))
      ):
          args = torch.ones(args)
  
      y = model(args)
      g = make_dot(y, model.named_parameters(), hl_graph)
      return hl_graph
  
file_path: tensorwatch/tensorwatch/model_graph/hiddenlayer/pytorch_builder_grad.py
imports: from graphviz import Digraph
  import torch
  from torch.autograd import Variable
  from .None import transforms
  from collections import abc
  import numpy
  from .graph import Graph, Node
label_desc: Use image node_id 3 for calling a global function with example usage: import_graph(hl_graph, model, args, input_names, verbose) and returns: hl_graph