def METHOD_NAME(self):
    """Translates the objct into a dictionary.
    It is meant to be called by JSONDecoder only.
    It relies on the attribute _attrToSerialize to know which attributes to
    serialize.
    The returned dictionary contains the attributes serialized as well as
    hints for reconstructing the object upon receive.
    :raises TypeError: If the object is not serializable (no _attrToSerialize defined)
    :returns: a dictionary representing the object
    """
    # If the object does not have _attrToSerialize defined
    # Raise TypeError
    if not hasattr(self, "_attrToSerialize"):
        raise TypeError("Object not serializable. _attrToSerialize not defined")
    jsonData = {}
    # Store the class name and the module name
    jsonData["__dCls"] = self.__class__.__name__
    jsonData["__dMod"] = self.__module__
    # self._attrToSerialize will be defined by the child class
    for attr in self._attrToSerialize:  # pylint: disable=no-member
        # If an argument to serialize is not defined,
        # we continue. This is handy for arguments that
        # are defined dynamicaly ,like SQLAlchemy does.
        if not hasattr(self, attr):
            continue
        attrValue = getattr(self, attr)
        if attrValue is not None:
            jsonData[attr] = attrValue
    return jsonData