<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __related_categories(self, category_id):
 """ Get all related categories to a given one """

        related = []
        for cat in self.categories_tree:
            if category_id in self.categories_tree[cat]:
                related.append(self.categories[cat])
        return related