TODO: Replace with more efficient way to do this...

def get_parent_component(self, fc):
        """
        TODO: Replace with more efficient way to do this...
        """
        if self.debug: print("Looking for parent of %s (%s)"%(fc.id, fc.parent_id)) 
        parent_comp = None
        for comp in self.components.values():
            if self.debug: print(" - Checking "+comp.id) 
            for child in comp.children:
                if parent_comp == None:
                    if child.id == fc.id and comp.id == fc.parent_id:
                        if self.debug: print("1) It is "+comp.id) 
                        parent_comp = comp
                    else:
                        for child2 in child.children:
                            if self.debug: print("    - Checking child: %s, %s"%(child.id,child2.id)) 
                            if parent_comp == None and child2.id == fc.id and child.id == fc.parent_id:
                                if self.debug: print("2) It is "+child.id) 
                                parent_comp = child
                                break
                            else:
                                if self.debug: print("No..."   )
        return parent_comp