code: def test_where_study_id(session: Session) -> None:
      sample_study = StudyModel(study_id=1, study_name="test-study")
      empty_study = StudyModel(study_id=2, study_name="test-study")
  
      session.add(
          StudySystemAttributeModel(
              study_id=sample_study.study_id,
              key="sample-key",
              value_json="1",
          )
      )
  
      assert 1 == len(
          StudySystemAttributeModel.where_study_id(
              sample_study.study_id, session
          )
      )
      assert 0 == len(
          StudySystemAttributeModel.where_study_id(
              empty_study.study_id, session
          )
      )
      # Check the case of unknown study_id.
      assert 0 == len(
          StudySystemAttributeModel.where_study_id(-1, session)
      )
  
imports: from datetime import datetime
  import pytest
  from sqlalchemy import create_engine
  from sqlalchemy.exc import IntegrityError
  from sqlalchemy.orm import Session
  from optuna.storages._rdb.models import BaseModel
  from optuna.storages._rdb.models import StudyDirectionModel
  from optuna.storages._rdb.models import StudyModel
  from optuna.storages._rdb.models import StudySystemAttributeModel
  from optuna.storages._rdb.models import TrialHeartbeatModel
  from optuna.storages._rdb.models import TrialIntermediateValueModel
  from optuna.storages._rdb.models import TrialModel
  from optuna.storages._rdb.models import TrialSystemAttributeModel
  from optuna.storages._rdb.models import TrialUserAttributeModel
  from optuna.storages._rdb.models import TrialValueModel
  from optuna.storages._rdb.models import VersionInfoModel
  from optuna.study._study_direction import StudyDirection
  from optuna.trial import TrialState
label_desc: Use image node_id 2 for calling the TestStudySystemAttributeModel obj's underlying member method code with example usage: obj.test_where_study_id(session) without return types