code: def filter_type(node_trees):
      nodelists = traverse_tree(node_trees)
      for thread_id, nodelist in nodelists.items():
          for node in nodelist:
              if not isinstance(node.type, str):
                  node.type = str(node.type).split(".")[1]
  
imports: from collections import defaultdict
  from collections import OrderedDict
  from .parser.distributed_parser import DistributedParser
  from .parser.kernel_parser import KernelParser
  from .parser.memory_parser import MemoryParser
  from .parser.operator_parser import OperatorParser
  from .parser.overview_parser import CPUType
  from .parser.overview_parser import GPUType
  from .parser.overview_parser import OverviewParser
  from .parser.trace_parser import TraceParser
  from .parser.utils import format_float
  from .parser.utils import format_memory
  from .parser.utils import format_ratio
  from .parser.utils import format_time
  from .parser.utils import traverse_tree
label_desc: Use image node_id 1 for calling a global function with example usage: filter_type(node_trees) without return types