<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def child_parent_relations(self, subj, obj, graph=None):
 """ Get all relationship type ids between a subject and a parent. Typically only one relation ID returned, but in some cases there may be more than one Arguments --------- subj: string Child (subject) id obj: string Parent (object) id Returns ------- list """

        if graph is None:
            graph = self.get_graph()
        preds = set()
        for _,ea in graph[obj][subj].items():
            preds.add(ea['pred'])
        logger.debug('{}->{} = {}'.format(subj,obj,preds))
        return preds