class_docstr: Tracks nodes and edges of a directed graph and supports basic operations on them.
class_docstr_tok: ["Tracks","nodes","and","edges","of","a","directed","graph","and","supports","basic","operations","on","them","."]
code: def __init__(
      self,
      model=None,
      args=None,
      input_names=None,
      transforms="default",
      framework_transforms="default",
      meaningful_ids=False,
  ):
      self.nodes = {}
      self.edges = []
      self.meaningful_ids = meaningful_ids  # TODO
      self.theme = THEMES["basic"]
  
      if model:
          # 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(self, model, args)
          elif framework == "tensorflow":
              from .tf_builder import import_graph, FRAMEWORK_TRANSFORMS
  
              import_graph(self, model)
  
          # Apply Transforms
          if framework_transforms:
              if framework_transforms == "default":
                  framework_transforms = FRAMEWORK_TRANSFORMS
              for t in framework_transforms:
                  t.apply(self)
          if transforms:
              if transforms == "default":
                  from .transforms import SIMPLICITY_TRANSFORMS
  
                  transforms = SIMPLICITY_TRANSFORMS
              for t in transforms:
                  t.apply(self)
  
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 1 to create a new Graph object  with example: obj = Graph(model, args, input_names, transforms, framework_transforms, meaningful_ids)