<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def discretize(self, method, *args, **kwargs):
 """ Discretizes the continuous distribution into discrete probability masses using various methods. Parameters method : A Discretizer Class from pgmpy.discretize *args, **kwargs: The parameters to be given to the Discretizer Class. Returns ------- An n-D array or a DiscreteFactor object according to the discretiztion method used. Examples -------- # TODO: finish this """

        return method(self, *args, **kwargs).get_discrete_values()