code: def to_dict(self, save_data=True):
          
          input_dict = super(SparseGP, self).to_dict(save_data)
          input_dict["class"] = "GPy.core.SparseGP"
          input_dict["Z"] = self.Z.tolist()
          return input_dict
docs: Convert the object into a json serializable dictionary.
  
          :param boolean save_data: if true, it adds the training data self.X and self.Y to the dictionary
          :return dict: json serializable dictionary containing the needed information to instantiate the object