docs: def decode(self, rec, deref=False):
          """Decode a record to return an object that could be considered
          equivalent to the original.
  
          The record is not touched if `_noodles` is not an item in the record.
  
          :param rec:
              A dictionary record to be decoded.
          :type rec: dict
  
          :param deref:
              Wether to decode a RefObject. If the encoder wrote files on a
              remote host, reading this file will be slow and result in an
              error if the file is not present.
          :type deref: bool"""
          if not isinstance(rec, dict):
              return rec
  
          if '_noodles' not in rec:
              return rec
  
          # if not deref:
          if rec.get('ref', False) and not deref:
              return RefObject(rec)
  
          typename = rec['type']
          classname = rec['class']
          try:
              cls = look_up(classname) if classname else None
          except (AttributeError, ImportError):
              cls = None
  
          if typename == '<object>':
              assert cls is not None, \
                  "could not lookup class '{}', decoding '{}'".format(
                      classname, rec)
              return self[cls].decode(cls, rec['data'])
          else:
              return self._sers[typename].decode(cls, rec['data'])