code: def build_graph(
      model=None,
      args=None,
      input_names=None,
      transforms="default",
      framework_transforms="default",
  ):
      # Initialize an empty graph
      g = Graph()
  
      # Detect framwork
      framework = detect_framework(model)
      if framework == "torch":
          from .pytorch_builder import (
              import_graph,
              FRAMEWORK_TRANSFORMS,
          )
  
          assert (
              args is not None
          ), "Argument args must be provided for Pytorch models."
          import_graph(g, model, args)
      elif framework == "tensorflow":
          from .tf_builder import import_graph, FRAMEWORK_TRANSFORMS
  
          import_graph(g, model)
      else:
          raise ValueError(
              "`model` input param must be a PyTorch, TensorFlow, or Keras-with-TensorFlow-backend model."
          )
  
      # Apply Transforms
      if framework_transforms:
          if framework_transforms == "default":
              framework_transforms = FRAMEWORK_TRANSFORMS
          for t in framework_transforms:
              g = t.apply(g)
      if transforms:
          if transforms == "default":
              from .transforms import SIMPLICITY_TRANSFORMS
  
              transforms = SIMPLICITY_TRANSFORMS
          for t in transforms:
              g = t.apply(g)
      return g
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import re
  from random import getrandbits
  import inspect
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: build_graph(model, args, input_names, transforms, framework_transforms) and returns: g