def _systemctl_status(name):
 contextkey = ('systemd._systemctl_status.%s' % name)
 if (contextkey in __context__):
  return __context__[contextkey]
 __context__[contextkey] = __salt__['cmd.run_all'](_systemctl_cmd('status', name), python_shell=False, redirect_stderr=True, ignore_retcode=True)
 return __context__[contextkey]

def _systemctl_status ( name ) : contextkey = ( 'systemd._systemctl_status.%s' % name ) if ( contextkey in __context__ ) : return __context__ [ contextkey ] __context__ [ contextkey ] = __salt__ [ 'cmd.run_all' ] ( _systemctl_cmd ( 'status' , name ) , python_shell = False , redirect_stderr = True , ignore_retcode = True ) return __context__ [ contextkey ]
helper function which leverages __context__ to keep from running systemctl status more than once .