code: def _get_singleton_session() -> Session:
      assert _determined is not None
      return _determined._session
  
imports: import functools
  import logging
  import pathlib
  import warnings
  from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, TypeVar, Union
  from determined.common.api import Session
  from determined.common.experimental._util import OrderBy
  from determined.common.experimental.checkpoint import Checkpoint, CheckpointOrderBy, CheckpointSortBy, CheckpointState, DownloadMode
  from determined.common.experimental.determined import Determined
  from determined.common.experimental.experiment import Experiment, ExperimentOrderBy, ExperimentSortBy, ExperimentState
  from determined.common.experimental.metrics import TrainingMetrics, TrialMetrics, ValidationMetrics
  from determined.common.experimental.model import Model, ModelOrderBy, ModelSortBy
  from determined.common.experimental.oauth2_scim_client import Oauth2ScimClient
  from determined.common.experimental.project import Project
  from determined.common.experimental.resource_pool import ResourcePool
  from determined.common.experimental.trial import Trial, TrialOrderBy, TrialSortBy, TrialState
  from determined.common.experimental.user import User
  from determined.common.experimental.workspace import Workspace
label_desc: Use image node_id 32 for calling a global function with example usage: _get_singleton_session() and returns: _determined