code: def intermediate_value_to_stored_repr(
      cls,
      value: float,
  ) -> Tuple[Optional[float], TrialIntermediateValueType]:
      if np.isnan(value):
          return (None, cls.TrialIntermediateValueType.NAN)
      elif value == float("inf"):
          return (None, cls.TrialIntermediateValueType.INF_POS)
      elif value == float("-inf"):
          return (None, cls.TrialIntermediateValueType.INF_NEG)
      else:
          return (value, cls.TrialIntermediateValueType.FINITE)
  
file_path: optuna/optuna/storages/_rdb/alembic/versions/v3.0.0.c.py
imports: import enum
  import numpy
  from alembic import op
  import sqlalchemy
  from sqlalchemy.exc import SQLAlchemyError
  from sqlalchemy import orm
  from typing import Optional
  from typing import Tuple
label_desc: Use image node_id 1 for calling the IntermediateValueModel obj's underlying member method code with example usage: obj.intermediate_value_to_stored_repr(cls, value) and returns: None,  cls, None,  cls, None,  cls, value,  cls