def find_comp_by_target(self, target):
        '''Finds a component using a TargetComponent or one of its subclasses.

        @param A @ref TargetComponent object or subclass of @ref
        TargetComponent.
        @return A Component object matching the target.
        @raises MissingComponentError

        '''
        for comp in self._components:
            if comp.id == target.component_id and \
                    comp.instance_name == target.instance_name:
                return comp
        raise MissingComponentError
def find_comp_by_target ( self , target ) : for comp in self . _components : if comp . id == target . component_id and comp . instance_name == target . instance_name : return comp raise MissingComponentError
Finds a component using a TargetComponent or one of its subclasses.

        @param A @ref TargetComponent object or subclass of @ref
        TargetComponent.
        @return A Component object matching the target.
        @raises MissingComponentError