code: def test_log_prob(dtype, dim, strength):
      with default_dtype(dtype):
          concentration = torch.full(
              (dim,), float(strength), requires_grad=True
          )
          value = dist.ProjectedNormal(
              torch.zeros_like(concentration)
          ).sample([10000])
          d = dist.ProjectedNormal(concentration)
  
          logp = d.log_prob(value)
          assert logp.max().lt(1 + dim * strength).all()
  
          logp.sum().backward()
          assert not torch.isnan(concentration.grad).any()
  
imports: import pytest
  import torch
  import pyro.distributions
  from tests.common import default_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: test_log_prob(dtype, dim, strength) without return types