code: def test_log_prob(concentration, rate, value):
      value = torch.tensor(value)
      log_prob = InverseGamma(concentration, rate).log_prob(value)
      expected_log_prob = (
          Gamma(concentration, rate).log_prob(1.0 / value)
          - 2.0 * value.log()
      )
      assert_equal(log_prob, expected_log_prob, prec=1e-6)
  
imports: import math
  import pytest
  import torch
  from pyro.distributions import Gamma, InverseGamma
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_log_prob(concentration, rate, value) without return types