def rule_match(component, cmd):
 if (component == cmd):
  return True
 expanded = rule_expand(component, cmd)
 if (cmd in expanded):
  return True
 return False

def rule_match ( component , cmd ) : if ( component == cmd ) : return True expanded = rule_expand ( component , cmd ) if ( cmd in expanded ) : return True return False
see if one rule component matches .