def is_driver_compatible(context, driver, interface, host_agent_types):
 is_interface_compatible = driver.is_interface_compatible(interface)
 if (not driver.agent_type):
  return is_interface_compatible
 return (is_interface_compatible and (driver.agent_type in host_agent_types))

def is_driver_compatible ( context , driver , interface , host_agent_types ) : is_interface_compatible = driver . is_interface_compatible ( interface ) if ( not driver . agent_type ) : return is_interface_compatible return ( is_interface_compatible and ( driver . agent_type in host_agent_types ) )
true if the driver is compatible with interface and host_agent_types .