def lookup_interfaces(macs, testbed, skip_interfaces=[]):
    """lookup_interfaces

    Given a dictionary of macs and a testbed, update the list of interfaces for each MAC Address
    with interfaces in the testbed where the MAC address is connected.

    Optional parameter:
        skip_interfaces : A list of interface names to NOT include in interface lists for macs

    Example returned value:
        {
        "0050.56bf.6f29": {
            "ip": "10.10.20.49",
            "interfaces": [
            {
                "device": "sw01-1",
                "interface": "Ethernet1/11",
                "mac_type": "dynamic",
                "vlan": "30"
            }
            ]
        },
        "5254.0006.91c9": {
            "ip": "10.10.20.172",
            "interfaces": [
            {
                "device": "sw01-1",
                "interface": "Ethernet1/12",
                "mac_type": "dynamic",
                "vlan": "30"
            }
            ]
        },
        }

    """

    # Common Interface names to ignore for recording into table
    ignored_interface_names = ["CPU", "Sup-eth1(R)", "vPC Peer-Link(R)"]

    # Combine common list with specified skip_interfaces
    ignored_interface_names += skip_interfaces

    for device in testbed.devices.values():
        try:
            mac_address_table = device.parse("show mac address-table")
        except Exception as e:
            print(
                f"Unable to retrieve MACs from device {device.name}. Likely missing parser for 'show mac address-table' or trying to lookup on router and not switch"
            )
            continue

        # Example data returned from show mac address-table command
        # {
        #   "mac_table": {
        #     "vlans": {
        #       "999": {
        #         "vlan": 999,
        #         "mac_addresses": {
        #           "5254.0000.c816": {
        #             "mac_address": "5254.0000.c816",
        #             "interfaces": {
        #               "GigabitEthernet0/3": {
        #                 "interface": "GigabitEthernet0/3",
        #                 "entry_type": "dynamic"
        #               }
        #             }
        #           }
        #         }
        #       }
        #     }
        #   },
        #   "total_mac_addresses": 3
        # }

        for vlan_id, vlan in mac_address_table["mac_table"]["vlans"].items():
            for mac_address, mac_details in vlan["mac_addresses"].items():
                if mac_address in macs.keys():
                    for interface in mac_details["interfaces"].values():
                        if interface["interface"] not in ignored_interface_names:
                            if "mac_type" in interface.keys():
                                mac_type = interface["mac_type"]
                            elif "entry_type" in interface.keys():
                                mac_type = interface["entry_type"]
                            else:
                                mac_type = "N/A"

                            macs[mac_address]["interfaces"].append(
                                {
                                    "device": device.name,
                                    "interface": interface["interface"],
                                    "mac_type": mac_type,
                                    "vlan": vlan_id,
                                }
                            )
                else:
                    print(f"No ARP for MAC Address {mac_address} found.")

    return macs