def parseLegend(legendNode):

    legendAttrDict = dict(legendNode.attributes.items())

    legend = Legend()
    legend.type     = legendAttrDict.get('type', '')
    legend.minLabel = legendAttrDict.get('minLabel', '')
    legend.maxLabel = legendAttrDict.get('maxLabel', '')
    legend.legendentries = []

    for entryNode in legendNode.getElementsByTagName("LegendEntry") :

       legendAttrDict = dict(entryNode.attributes.items())

       legendEntry = LegendEntry()

       legendEntry.rgb       = legendAttrDict.get('rgb', '')
       legendEntry.label     = legendAttrDict.get('label', '')
       legendEntry.id        = legendAttrDict.get('id', '')
       legendEntry.showTick  = False if legendAttrDict not in 'showTick' else legendAttrDict.get('showTick') == "true"
       legendEntry.showLabel = False if 'showLabel' not in legendAttrDict else legendAttrDict.get('showLabel') == "true"

       legend.legendentries.append(legendEntry)

    return legend

## END Parse Legend ##
dataset/ETHPy150Open nasa-gibs/onearth/src/scripts/colorMaptoHTML.py/parseLegend/swapped operands of `not in`