code: def _run_command_in_extended_path(syslog_ng_sbin_dir, command, params):
      '''
      Runs the specified command with the syslog_ng_sbin_dir in the PATH
      '''
      orig_path = os.environ.get('PATH', '')
      env = None
      if syslog_ng_sbin_dir:
          # Custom environment variables should be str types. This code
          # normalizes the paths to unicode to join them together, and then
          # converts back to a str type.
          env = {
              str('PATH'): salt.utils.stringutils.to_str(  # future lint: disable=blacklisted-function
                  os.pathsep.join(
                      salt.utils.data.decode(
                          (orig_path, syslog_ng_sbin_dir)
                      )
                  )
              )
          }
      return _run_command(command, options=params, env=envf _run_command_in_extended_path(syslog_ng_sbin_dir, command, params):
      '''
      Runs the specified command with the syslog_ng_sbin_dir in the PATH
      '''
      orig_path = os.environ.get('PATH', '')
      env = None
      if syslog_ng_sbin_dir:
          # Custom environment variables should be str types. This code
          # normalizes the paths to unicode to join them together, and then
          # converts back to a str type.
          env = {
              str('PATH'): salt.utils.stringutils.to_str(  # future lint: disable=blacklisted-function
                  os.pathsep.join(
                      salt.utils.data.decode(
                          (orig_path, syslog_ng_sbin_dir)
                      )
                  )
              )
          }
      return _run_command(command, options=params, env=env)
docs: Runs the specified command with the syslog_ng_sbin_dir in the PATH