human
Solve the following python programming problem given the following code:
def _get_matching(self, reltype, target, is_external = False) : 
    '
        Return relationship of matching *reltype*, *target*, and
        *is_external* from collection, or None if not found.
        ' 
    def matches(rel, reltype, target, is_external) : 
        if (rel.reltype != reltype) : 
            return False 
if (rel.is_external != is_external) : 
            return False 
rel_target = (rel.target_ref if rel.is_external else rel.target_part) 
        if (rel_target != target) : 
            return False 
return True 
for rel in self.values () : 
        if matches (rel, reltype, self, is_external) : 
            return rel 
return None 

    
    

    Fix the buggy line: if matches (rel, reltype, self, is_external) :
assistant
#Here is Python code to fix the buggy line: if matches (rel, reltype, self, is_external) :
.

if matches (rel, reltype, target, is_external) :