def has_tag(node, kind):
 for d in node['directory']:
  if (d.kind == kind):
   return True
 return False

def has_tag ( node , kind ) : for d in node [ 'directory' ] : if ( d . kind == kind ) : return True return False
check if the node contains a tag of a given kind .