def listener_dict_to_tuple(listener):
    # We define all listeners as complex listeners.
    if 'instance_protocol' not in listener:
        instance_protocol = listener['elb_protocol'].upper()
    else:
        instance_protocol = listener['instance_protocol'].upper()
    listener_tuple = [listener['elb_port'], listener['instance_port'],
                      listener['elb_protocol'], instance_protocol]
    if 'certificate' in listener:
        listener_tuple.append(listener['certificate'])
    return tuple(listener_tuple)
Convert an ELB listener dict into a listener tuple used by certain parts of
dataset/ETHPy150Open saltstack/salt/salt/modules/boto_elb.py/listener_dict_to_tuple