def METHOD_NAME(dev_id):
    dev_addr = ''
    dev_addr_fmt = '%02d:%02d.%d'
    pci_info = vm.monitor.info('pci', debug=False)
    if isinstance(pci_info, list):
        device = _get_device(pci_info[0]['devices'], dev_id)
        if device:
            dev_addr = dev_addr_fmt % (device['bus'],
                                       device['slot'],
                                       device['function'])
    else:
        # As device id in the last line of info pci output
        # We need reverse the pci information to get the pci addr which is in the
        # front row.
        pci_list = str(pci_info).split("\n")
        pci_list.reverse()
        pci_info = " ".join(pci_list)
        dev_match = re.search(nic_addr_filter % dev_id, pci_info)
        if dev_match:
            bus_slot_func = [int(i) for i in dev_match.groups()]
            dev_addr = dev_addr_fmt % tuple(bus_slot_func)
    return dev_addr