code: def unpack_ip_addr(addr):
      
      if isinstance(addr, bytearray):
          addr = bytes(addr)
      return (socket.inet_ntoa(addr[0:4]), struct.unpack('!H', addr[4:6])[0])
docs: Given a six-octet BACnet address, return an IP address tuple.