def to_dict(self):
        """
        Convert the object into a json serializable dictionary.

        Note: It uses the private method _save_to_input_dict of the parent.

        :return dict: json serializable dictionary containing the needed information to instantiate the object
        """

        input_dict = super(EP, self)._save_to_input_dict()
        input_dict["class"] = "GPy.inference.latent_function_inference.expectation_propagation.EP"
        if self.ga_approx_old is not  None:
            input_dict["ga_approx_old"] = self.ga_approx_old.to_dict()
        if self._ep_approximation is not  None:
            input_dict["_ep_approximation"] = {}
            input_dict["_ep_approximation"]["post_params"] = self._ep_approximation[0].to_dict()
            input_dict["_ep_approximation"]["ga_approx"] = self._ep_approximation[1].to_dict()
            input_dict["_ep_approximation"]["cav_params"] = self._ep_approximation[2].to_dict()
            input_dict["_ep_approximation"]["log_Z_tilde"] = self._ep_approximation[3].tolist()

        return input_dict
Convert the object into a json serializable dictionary.

        Note: It uses the private method _save_to_input_dict of the parent.

        :return dict: json serializable dictionary containing the needed information to instantiate the object