Convert the class to dict.

        Returns:
            dict: Copy of ``self.__dict__``.

def get_mapping(self):  # TODO: rename to _as_dict
        """
        Convert the class to dict.

        Returns:
            dict: Copy of ``self.__dict__``.
        """
        return {
            key: val
            for key, val in self.__dict__.iteritems()
            if val
        }