code: def test_find_sample_id() -> None:
      sampler = _init_QMCSampler_without_exp_warning(
          qmc_type="halton", seed=0
      )
      study = optuna.create_study()
      for i in range(5):
          assert sampler._find_sample_id(study) == i
  
      # Change seed but without scramble. The hash should remain the same.
      with patch.object(sampler, "_seed", 1) as _:
          assert sampler._find_sample_id(study) == 5
  
          # Seed is considered only when scrambling is enabled.
          with patch.object(sampler, "_scramble", True) as _:
              assert sampler._find_sample_id(study) == 0
  
      # Change qmc_type.
      with patch.object(sampler, "_qmc_type", "sobol") as _:
          assert sampler._find_sample_id(study) == 0
  
imports: from typing import Any
  from typing import Callable
  from typing import Dict
  from unittest.mock import Mock
  from unittest.mock import patch
  import warnings
  import numpy
  import pytest
  import optuna
  from optuna.distributions import BaseDistribution
  from optuna.trial import Trial
  from optuna.trial import TrialState
label_desc: Use image node_id 16 for calling a global function with example usage: test_find_sample_id() without return types