code: def get_stack() -> Optional[str]:
      
      stack = SETTINGS.stack
      if not stack:
          require_test_mode_enabled()
          raise RunError('Missing stack name; for test mode, please set PULUMI_NODEJS_STACK')
      return stack
docs: Returns the current stack name.