def METHOD_NAME(device_type):
    """
    Get VM hostdev device/interface
    :param device_type: Device type
    :return: The first VM hostdev device or interface
    """
    try:
        vm_hostdev = vm_xml.VMXML.new_from_dumpxml(vm.name)\
            .devices.by_device_tag(device_type)[0]
    except IndexError:
        vm_hostdev = vm_xml.VMXML.new_from_inactive_dumpxml(vm.name)\
            .devices.by_device_tag(device_type)[0]
    return vm_hostdev