code: def __exit__(
      self,
      exc_type: Optional[Type[BaseException]],
      exc_val: Optional[BaseException],
      exc_tb: Optional[TracebackType],
  ) -> Literal[False]:
      # Only update if the current state is running
      if self._current_state == "running":
          # We need to sleep here for a very short time to prevent issues when
          # the status is updated too quickly. If an .update() is directly followed
          # by the exit of the context manager, sometimes only the last update
          # (to complete) is applied. Adding a short timeout here allows the frontend
          # to render the update before.
          time.sleep(0.05)
          if exc_type is not None:
              # If an exception was raised in the context,
              # we want to update the status to error.
              self.update(state="error")
          else:
              self.update(state="complete")
      return super().__exit__(exc_type, exc_val, exc_tb)
  
file_path: streamlit/lib/streamlit/elements/lib/mutable_status_container.py
imports: from __future__ import annotations
  import time
  from types import TracebackType
  from typing import List, Optional, Type, cast
  from typing_extensions import Literal, TypeAlias
  from streamlit.cursor import Cursor
  from streamlit.delta_generator import DeltaGenerator, _enqueue_message
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Block_pb2 import Block
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
label_desc: Use image node_id 5 for calling the StatusContainer obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) and returns: super