Get a dictionary serialization of the object to convert into a Json
        object.

        Returns
        -------
        dict

def to_dict(self):
        """Get a dictionary serialization of the object to convert into a Json
        object.

        Returns
        -------
        dict
        """
        return {
            'prediction' : self.prediction_file.to_dict(),
            'attachments' : [a.to_dict() for a in self.attachments]
        }