def get_network_device(hardware_devices, mac_address):
 if (hardware_devices.__class__.__name__ == 'ArrayOfVirtualDevice'):
  hardware_devices = hardware_devices.VirtualDevice
 for device in hardware_devices:
  if (device.__class__.__name__ in vm_util.ALL_SUPPORTED_NETWORK_DEVICES):
   if hasattr(device, 'macAddress'):
    if (device.macAddress == mac_address):
     return device

def get_network_device ( hardware_devices , mac_address ) : if ( hardware_devices . __class__ . __name__ == 'ArrayOfVirtualDevice' ) : hardware_devices = hardware_devices . VirtualDevice for device in hardware_devices : if ( device . __class__ . __name__ in vm_util . ALL_SUPPORTED_NETWORK_DEVICES ) : if hasattr ( device , 'macAddress' ) : if ( device . macAddress == mac_address ) : return device
return the network device with mac mac_address .