code: def test_multi_objective_sample_int_distributions(
      log: bool, step: int
  ) -> None:
      """Test sampling from int distribution returns integer."""
  
      study = optuna.create_study(directions=["minimize", "maximize"])
      random.seed(128)
  
      def int_value_fn(idx: int) -> float:
          return random.randint(1, 99)
  
      int_dist = optuna.distributions.IntDistribution(1, 99, log, step)
      past_trials = [
          frozen_trial_factory(
              i,
              [random.random(), random.random()],
              dist=int_dist,
              value_fn=int_value_fn,
          )
          for i in range(16)
      ]
  
      trial = frozen_trial_factory(16, [0, 0])
      sampler = TPESampler(seed=0)
      int_suggestion = suggest(
          sampler, study, trial, int_dist, past_trials
      )
      assert 1 <= int_suggestion <= 99
      assert isinstance(int_suggestion, int)
  
imports: import random
  from typing import Callable
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Union
  from unittest.mock import patch
  from unittest.mock import PropertyMock
  import numpy
  import pytest
  import optuna
  from optuna.samplers import _tpe
  from optuna.samplers import TPESampler
label_desc: Use image node_id 8 for calling a global function with example usage: test_multi_objective_sample_int_distributions(log, step) and returns: random