<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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