def _check_rel(element):
 if ('rel' not in element):
  return True
 must_have = {'stylesheet', 'icon'}
 rels = [rel.lower() for rel in element['rel'].split(' ')]
 return any(((rel in rels) for rel in must_have))

def _check_rel ( element ) : if ( 'rel' not in element ) : return True must_have = { 'stylesheet' , 'icon' } rels = [ rel . lower ( ) for rel in element [ 'rel' ] . split ( ' ' ) ] return any ( ( ( rel in rels ) for rel in must_have ) )
return true if the elements rel attribute fits our criteria .