'Get recog replacement string, if one exists, otherwise
get sdesc and as a last resort, the object\'s key.
Args:
obj (Object): The object, whose sdesc to replace
Returns:
recog (str): The replacement string to use.
Notes:
This method will respect a "enable_recog" lock set on
`obj` (True by default) in order to turn off recog
mechanism. This is useful for adding masks/hoods etc.'

def get(self, obj):

    if obj.access(self.obj, 'enable_recog', default=True):
        return self.obj2recog.get(obj, (obj.sdesc.get() if hasattr(obj, 'sdesc') else obj.key))
    else:
        return (obj.sdesc.get() if hasattr(obj, 'sdesc') else obj.key)
