def pci_device_prop_match(pci_dev, specs):
 def _matching_devices(spec):
  return all(((pci_dev.get(k) == v) for (k, v) in spec.items()))
 return any((_matching_devices(spec) for spec in specs))

def pci_device_prop_match ( pci_dev , specs ) : def _matching_devices ( spec ) : return all ( ( ( pci_dev . get ( k ) == v ) for ( k , v ) in spec . items ( ) ) ) return any ( ( _matching_devices ( spec ) for spec in specs ) )
check if the pci_dev meet spec requirement specs is a list of pci device property requirements .