def _assure_identity(fnc):
 def _wrapped(*args, **kwargs):
  if (identity is None):
   _create_identity()
  return fnc(*args, **kwargs)
 return _wrapped

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 .