def get_ip_label(ip):
    """
    Format ip address of the node and convert into label

    The label will consist of hexadecimal values of the ip. Each octet will be
    converted into it's corresponding hex value and the whole label will be
    saved as an 8 character string. For example, 10.255.0.192 would have a
    label of 0AFF00C0
    """
    ip_label = ""

    for octet in ip.split("."):
        hex_val = hex(int(octet))[2:]

        if len(hex_val) == 1:
            hex_val = "0" + hex_val

        ip_label += hex_val

    return ip_label