code: def get_user_shell():
      
      try:
          pw_shell = pwd.getpwuid(os.geteuid()).pw_shell
      except KeyError:
          pw_shell = None
  
      return pw_shell or '/bin/sh'
docs: For commands executed directly via an SSH command-line, SSH looks up the
      user's shell via getpwuid() and only defaults to /bin/sh if that field is
      missing or empty.