code: def get_or_create_dot_id(obj, prefix="", assert_on_missing=False):
      """If obj's ID has been registered, return it.
      If not, either assert or create a unique and legal ID, register and
      return it, according to assert_on_missing.
      ID must be a unique and legal Dotty ID.
  
       Parameters
       ----------
       obj : objet
                   Serve as the key to the ID.
  
       prefix : string
                   Prefix to attach to the ID.  Usually use obj's non-unique
                   name as prefix.
  
       assert_on_missing : bool
                   Assert or not if object doesn't have a registered ID.
      """
      prefix = prefix.replace(".", "_")
      if not hasattr(get_or_create_dot_id, "obj_id_dict"):
          get_or_create_dot_id.obj_id_dict = {}
      if obj not in get_or_create_dot_id.obj_id_dict:
          if assert_on_missing:
              assert False, (
                  "dot_id " + str(obj) + " has not been registered."
              )
          else:
              get_or_create_dot_id.obj_id_dict[obj] = prefix + hex(
                  id(obj)
              )
      return get_or_create_dot_id.obj_id_dict[obj]
  
imports: import html
  import json
  import warnings
  from graphviz import Digraph
  from graphviz import Source
  import tvm
label_desc: Use image node_id 4 for calling a global function with example usage: get_or_create_dot_id(obj, prefix, assert_on_missing) and returns: get_or_create_dot_id