'Returns an integer hash of this key.
Implements Python\'s hash protocol so that Keys may be used in sets and as
dictionary keys.
Returns:
int'

def __hash__(self):

    args = self.to_path(_default_id=0, _fail=False)
    args.append(self.__reference.app())
    return (hash(type(args)) ^ hash(tuple(args)))
