<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy(self):
 """ Makes a copy of the factor. Returns ------- CanonicalDistribution object: Copy of the factor Examples -------- np.array([[1], [-1]]), -3) ['X', 'Y'] array([[1, -1], [-1, 1]]) array([[1], [-1]]) -3 ['X', 'Y'] array([[1, -1], [-1, 1]]) array([[1], [-1]]) -3 """

        copy_factor = CanonicalDistribution(self.variables, self.K.copy(),
                                            self.h.copy(), self.g)

        return copy_factor