code: def test_stochastic_heuristic(
      stochastic_heuristic, base_heuristic, sampled_predictions
  ):
      heur_temp_1 = stochastic_heuristic(
          base_heuristic(), query_size=100, temperature=1.0
      )
      heur_temp_10 = stochastic_heuristic(
          base_heuristic(), query_size=100, temperature=10.0
      )
      heur_temp_05 = stochastic_heuristic(
          base_heuristic(), query_size=100, temperature=0.01
      )
  
      scores = heur_temp_1.get_scores(sampled_predictions)
  
      dist_temp_1, dist_temp_10, dist_temp_05 = (
          heur_temp_1._make_distribution(scores),
          heur_temp_10._make_distribution(scores),
          heur_temp_05._make_distribution(scores),
      )
  
      assert entropy(dist_temp_1) < entropy(dist_temp_10)
      # NOTE: it is possible that this fails, as temp_1 can already have minimal entropy. This is unlikely.
      assert entropy(dist_temp_1) > entropy(dist_temp_05)
  
imports: import numpy
  import pytest
  from scipy.stats import entropy
  from baal.active.heuristics import BALD, Entropy
  from baal.active.heuristics.stochastics import GibbsSampling, RankBasedSampling, PowerSampling
label_desc: Use image node_id 2 for calling a global function with example usage: test_stochastic_heuristic(stochastic_heuristic, base_heuristic, sampled_predictions) without return types