code: def default_peek(python_type, exposes):
      
      with_args = False
      make = python_type
      try:
          make()
      except (SystemExit, KeyboardInterrupt):
          raise
      except:
          make = lambda: python_type.__new__(python_type)
          try:
              make()
          except (SystemExit, KeyboardInterrupt):
              raise
          except:
              make = lambda args: python_type.__new__(python_type, *args)
              with_args = True
      def missing(attr):
          return AttributeError("can't set attribute '{}' ({})".format(attr, python_type))
      if with_args:
          def peek(store, container, _stack=None):
              state = []
              for attr in exposes: # force order instead of iterating over `container`
                  #print((attr, attr in container)) # debugging
                  if attr in container:
                      state.append(store.peek(attr, container, _stack=_stack))
                  else:
                      state.append(None)
              return make(state)
      elif '__dict__' in exposes:
          def peek(store, container, _stack=None):
              obj = make()
              for attr in container:
                  val = store.peek(attr, container, _stack=_stack)
                  try:
                      setattr(obj, attr, val)
                  except AttributeError:
                      raise missing(attr)
              return obj
      else:
          def peek(store, container, _stack=None):
              obj = make()
              for attr in exposes: # force order instead of iterating over `container`
                  #print((attr, attr in container)) # debugging
                  if attr in container:
                      val = store.peek(attr, container, _stack=_stack)
                  else:
                      val = None
                  try:
                      setattr(obj, attr, val)
                  except AttributeError:
                      raise missing(attr)
              return obj
      return peek
docs: Autoserializer factory.
  
      Works best in Python 3.
  
      Arguments:
  
          python_type (type): type constructor.
  
          exposes (iterable): sequence of attributes.
  
      Returns:
  
          callable: deserializer (`peek` routine).