docstr: End the current session.
docstr_tok: ["End","the","current","session","."]
code: def end_session(self) -> None:
      """End the current session."""
      assert self.hub is not None
      # get the current client and scope
      client, scope = self.hub._stack[-1]
      session = scope._session
  
      if session is not None and client is not None:
          self.hub.end_session()
          client.flush()
  
imports: import atexit
  import functools
  import os
  import pathlib
  import sys
  from types import TracebackType
  from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Tuple, Type, Union
  from urllib.parse import quote
  import sentry_sdk
  import sentry_sdk.utils
  import wandb
  import wandb.env
  import wandb.util
label_desc: Use image node_id 8 for calling the Sentry obj's underlying member method code with example usage: obj.end_session() without return types