code: def gen_shell(opts, **kwargs):
      '''
      Return the correct shell interface for the target system
      '''
      if kwargs['winrm']:
          try:
              import saltwinshell
              shell = saltwinshell.Shell(opts, **kwargs)
          except ImportError:
              log.error('The saltwinshell library is not available')
              sys.exit(salt.defaults.exitcodes.EX_GENERIC)
      else:
          shell = Shell(opts, **kwargs)
      return shelf gen_shell(opts, **kwargs):
      '''
      Return the correct shell interface for the target system
      '''
      if kwargs['winrm']:
          try:
              import saltwinshell
              shell = saltwinshell.Shell(opts, **kwargs)
          except ImportError:
              log.error('The saltwinshell library is not available')
              sys.exit(salt.defaults.exitcodes.EX_GENERIC)
      else:
          shell = Shell(opts, **kwargs)
      return shell
docs: Return the correct shell interface for the target system