code: def interface_lookup(interfaces, hwaddr, address_type):
      
      for interface in interfaces.values():
          if interface.get('hwaddr') == hwaddr:
              for address in interface.get('addrs'):
                  if address.get('type') == address_type:
                      return address.get('addr')
docs: Search the address within the interface list.