def get_category(self, code):
candidates = list(filter(lambda c: c.code == code, itertools.chain(self.list_income_categories(), self.list_expense_categories())))<EOL>if not len(candidates):<EOL><INDENT>return None<EOL><DEDENT>return candidates[<NUM_LIT:0>]<EOL>
Gets category with given code

        NOTE: Filters the list of income and expense categories in this end due to API limitations