def only_ci(decorated_func):
 @wraps(decorated_func)
 def _inner_func(*args, **kwds):
  if is_running_on_ci():
   return decorated_func(*args, **kwds)
 return _inner_func

def only_ci ( decorated_func ) : @ wraps ( decorated_func ) def _inner_func ( * args , ** kwds ) : if is_running_on_ci ( ) : return decorated_func ( * args , ** kwds ) return _inner_func
this decorator runs the function thats being decorated only if the code is being run in ci environment .