code: def get(cls):  # type: () -> Shell
          
          if cls._shell is not None:
              return cls._shell
  
          try:
              name, path = detect_shell(os.getpid())
          except (RuntimeError, ShellDetectionFailure):
              raise RuntimeError("Unable to detect the current shell.")
  
          cls._shell = cls(name, path)
  
          return cls._shell
docs: Retrieve the current shell.