def to_dict(self):
        """
        Return the node as a dictionary.

        Returns
        -------
        dict: All the attributes of this node as a dictionary (minus the left
              and right).
        """
        out = {}
        for key in self.__dict__.keys():
            if key not in ['left', 'right', 'missing', 'parent']:
                out[key] = self.__dict__[key]
        return out