def _assure_identity(fnc):
    def _wrapped(*args, **kwargs):
        if identity is None:
            _create_identity()
        return fnc(*args, **kwargs)
    return _wrapped
Ensures that the 'identity' attribute is not None.
dataset/ETHPy150Open rackspace/pyrax/pyrax/__init__.py/_assure_identity