def _class_matcher(target_cls):
 def match(node):
  return isinstance(node, target_cls)
 return match

def _class_matcher ( target_cls ) : def match ( node ) : return isinstance ( node , target_cls ) return match
match a node if its an instance of the given class .