<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_parents(self):
 """ Add the parents to BIF Returns ------- dict: dict of type {variable: a list of parents} Example ------- {'bowel-problem': [], 'dog-out': ['bowel-problem', 'family-out'], 'family-out': [], 'hear-bark': ['dog-out'], 'light-on': ['family-out']} """

        cpds = self.model.get_cpds()
        cpds.sort(key=lambda x: x.variable)
        variable_parents = {}
        for cpd in cpds:
            variable_parents[cpd.variable] = []
            for parent in sorted(cpd.variables[:0:-1]):
                variable_parents[cpd.variable].append(parent)
        return variable_parents