code: def freeze(obj):
      '''
      Freeze python types by turning them into immutable structures.
      '''
      if isinstance(obj, dict):
          return ImmutableDict(obj)
      if isinstance(obj, list):
          return ImmutableList(obj)
      if isinstance(obj, set):
          return ImmutableSet(obj)
      return obf freeze(obj):
      '''
      Freeze python types by turning them into immutable structures.
      '''
      if isinstance(obj, dict):
          return ImmutableDict(obj)
      if isinstance(obj, list):
          return ImmutableList(obj)
      if isinstance(obj, set):
          return ImmutableSet(obj)
      return obj
docs: Freeze python types by turning them into immutable structures.