code: def default_exit(path, key, old_parent, new_parent, new_items):
      # print('exit(%r, %r, %r, %r, %r)'
      #       % (path, key, old_parent, new_parent, new_items))
      ret = new_parent
      if isinstance(new_parent, Mapping):
          new_parent.update(new_items)
      elif isinstance(new_parent, Sequence):
          vals = [v for i, v in new_items]
          try:
              new_parent.extend(vals)
          except AttributeError:
              ret = new_parent.__class__(vals)  # tuples
      elif isinstance(new_parent, Set):
          vals = [v for i, v in new_items]
          try:
              new_parent.update(vals)
          except AttributeError:
              ret = new_parent.__class__(vals)  # frozensets
      else:
          raise RuntimeError(
              "unexpected iterable type: %r" % type(new_parent)
          )
      return ret
  
imports: import os
  import math
  import time
  import codecs
  import random
  import socket
  import hashlib
  import itertools
  from collections import Mapping, Sequence, Set, ItemsView
label_desc: Use image node_id 25 for calling a global function with example usage: default_exit(path, key, old_parent, new_parent, new_items) and returns: ret