def _get_key(self, element):

        try:
            key = hash(element)

        except:
            key = id(element)

        return key
Generate the key for the element to id map.
dataset/ETHPy150Open enthought/pyface/pyface/viewer/tree_viewer.py/TreeViewer._get_key