<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_generator(self):
 """Return the generator object to anonymize data."""


        faker = Faker()

        try:
            return getattr(faker, self.category)

        except AttributeError:
            raise ValueError('Category {} couldn\'t be found on faker')