class_docstr: Storage class that stores data in memory of the Python process.
  
  This class is not supposed to be directly accessed by library users.
class_docstr_tok: ["Storage","class","that","stores","data","in","memory","of","the","Python","process",".","This","class","is","not","supposed","to","be","directly","accessed","by","library","users","."]
code: def _check_trial_id(self, trial_id: int) -> None:
      if trial_id not in self._trial_id_to_study_id_and_number:
          raise KeyError(
              "No trial with trial_id {} exists.".format(trial_id)
          )
  
imports: import copy
  from datetime import datetime
  import threading
  from typing import Any
  from typing import Container
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  import uuid
  import optuna
  from optuna import distributions
  from optuna._typing import JSONSerializable
  from optuna.exceptions import DuplicatedStudyError
  from optuna.storages import BaseStorage
  from optuna.storages._base import DEFAULT_STUDY_NAME_PREFIX
  from optuna.study._frozen import FrozenStudy
  from optuna.study._study_direction import StudyDirection
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 32 for calling the InMemoryStorage obj's underlying member method code with example usage: obj._check_trial_id(trial_id) without return types