code: def ext_hook(self, code, data):
          
          if code == self.EXT_DATETIME:
              # Unpack datetime object from a big-endian signed 64-bit integer.
              microseconds = self.STRUCT_DATETIME.unpack(data)[0]
              return datetime.datetime.utcfromtimestamp(microseconds / 1000000.0)
          elif code == self.EXT_DATE:
              # Unpack local-date object from a big-endian unsigned short and two big-endian unsigned chars
              return datetime.date(*self.STRUCT_DATE.unpack(data))
          elif code == self.EXT_TIME:
              # Unpack a dateless-time object from three big-endian unsigned chars and a big-endian unsigned
              # 32-bit integer.
              return datetime.time(*self.STRUCT_TIME.unpack(data))
          elif code == self.EXT_DECIMAL:
              obj_len = self.STRUCT_DECIMAL_LENGTH.unpack(data[:2])[0]
              obj_decoder = struct.Struct(str('!{}s'.format(obj_len)))
              return decimal.Decimal(obj_decoder.unpack(data[2:])[0].decode('utf-8'))
          elif code == self.EXT_CURRINT:
              # Unpack Amount object into (code, minor) from a 3-char ASCII string and a signed 64-bit integer.
              code, minor_value = self.STRUCT_CURRINT.unpack(data)
              return currint.Amount.from_code_and_minor(code.decode('ascii'), minor_value)
          else:
              raise TypeError('Cannot decode unknown extension type {} from MessagePack'.format(code))
docs: Decodes our custom extension types