@staticmethod
    def parse(strNode):
        try:
            node = ElementTree.fromstring(strNode)
        except SyntaxError:
            #it was serialized using pickle
            class FixUnpickler(pickle.Unpickler):
                def find_class(self, module, name):
                    if module == 'packages.vtk.tf_widget':
                        module = 'vistrails.packages.vtk.tf_widget'
                    return pickle.Unpickler.find_class(self, module, name)
            tf = FixUnpickler(StringIO.StringIO(strNode.decode('hex'))).load()
            tf._pts.sort()
            return tf
        
        if node.tag != 'transfer_function':
            return None
        #read attributes
        tf = TransferFunction()
        tf._min_range = float(node.get('min_range', "0.0")) 
        tf._max_range = float(node.get('max_range', "1.0"))
        for ptNode in node.getchildren():
            if ptNode.tag == 'point':
                scalar = float(ptNode.get('scalar','-1.0'))
                opacity = float(ptNode.get('opacity', '1.0'))
                for colorNode in ptNode.getchildren():
                    if colorNode.tag == 'color':
                        color = (float(colorNode.get('R','0.0')),
                                 float(colorNode.get('G','0.0')),
                                 float(colorNode.get('B','0.0')))
                        break
                else:
                    assert "'point' node has no 'color' child"
                tf._pts.append((scalar,opacity,color))
        tf._pts.sort()
        return tf
    
##############################################################################
# Graphics Items
parse(strNode: str) -> TransferFunction
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/vtk/tf_widget.py/TransferFunction.parse