@abstractmethod<EOL><INDENT>def register_custom_type(self, cls, marshaller, unmarshaller, typename):<DEDENT>
Register a marshaller and/or unmarshaller for the given class.

The state object returned by the marshaller and passed to the unmarshaller can be any
serializable type. Usually a dictionary mapping of attribute names to values is used.

.. warning:: Registering marshallers/unmarshallers for any custom type will override any
    serializer specific encoding/decoding hooks (respectively) already in place!

:param cls: the class to register
:param marshaller: a callable that takes the object to be marshalled as the argument and
      returns a state object
:param unmarshaller: a callable that takes an uninitialized object and its state object
    as arguments and restores the state of the object
:param typename: a unique identifier for the type (defaults to the ``module:varname``
    reference to the class)