@classmethod
def encode_data(cls, obj, typedef):
    """Encode an object's data.

        Args:
            obj (object): Object to encode.
            typedef (dict): Type definition that should be used to encode the
                object.

        Returns:
            string: Encoded object.

        """
    mod = obj.__module__
    fun = obj.__name__
    out = '%s:%s' % (mod, fun)
    return out
