code: def test_multi_objective_sample_independent(
      multi_objective_sampler_class: Callable[[], BaseSampler],
      distribution: BaseDistribution,
  ) -> None:
      study = optuna.study.create_study(
          directions=["minimize", "maximize"],
          sampler=multi_objective_sampler_class(),
      )
      for i in range(100):
          value = study.sampler.sample_independent(
              study, _create_new_trial(study), "x", distribution
          )
          assert distribution._contains(
              distribution.to_internal_repr(value)
          )
  
          if not isinstance(distribution, CategoricalDistribution):
              # Please see https://github.com/optuna/optuna/pull/393 why this assertion is needed.
              assert not isinstance(value, np.floating)
  
          if isinstance(distribution, FloatDistribution):
              if distribution.step is not None:
                  # Check the value is a multiple of `distribution.step` which is
                  # the quantization interval of the distribution.
                  value -= distribution.low
                  value /= distribution.step
                  round_value = np.round(value)
                  np.testing.assert_almost_equal(round_value, value)
  
imports: from __future__ import annotations
  from collections.abc import Callable
  from collections.abc import Sequence
  import multiprocessing
  from multiprocessing.managers import DictProxy
  import os
  import pickle
  from typing import Any
  from unittest.mock import patch
  import warnings
  from _pytest.fixtures import SubRequest
  from _pytest.mark.structures import MarkDecorator
  import numpy
  import pytest
  import optuna
  from optuna.distributions import BaseDistribution
  from optuna.distributions import CategoricalChoiceType
  from optuna.distributions import CategoricalDistribution
  from optuna.distributions import FloatDistribution
  from optuna.distributions import IntDistribution
  from optuna.integration.botorch import logei_candidates_func
  from optuna.integration.botorch import qei_candidates_func
  from optuna.samplers import BaseSampler
  from optuna.samplers._lazy_random_state import LazyRandomState
  from optuna.study import Study
  from optuna.testing.objectives import fail_objective
  from optuna.testing.objectives import pruned_objective
  from optuna.trial import FrozenTrial
  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_multi_objective_sample_independent(multi_objective_sampler_class, distribution) without return types