I have written a function that returns the prime factors of a given integer. For the cases I tested, it seems to work alright. Here is the original function.
def