code: def test_integer_shapes(distname, shapename, shapes):
      dist = getattr(stats, distname)
      shape_info = dist._shape_info()
      shape_names = [shape.name for shape in shape_info]
      i = shape_names.index(
          shapename
      )  # this element of params must be integral
  
      shapes_copy = list(shapes)
  
      valid_shape = shapes[i]
      invalid_shape = valid_shape - 0.5  # arbitrary non-integral value
      new_valid_shape = valid_shape - 1
      shapes_copy[i] = [
          [valid_shape],
          [invalid_shape],
          [new_valid_shape],
      ]
  
      a, b = dist.support(*shapes)
      x = np.round(np.linspace(a, b, 5))
  
      pmf = dist.pmf(x, *shapes_copy)
      assert not np.any(np.isnan(pmf[0, :]))
      assert np.all(np.isnan(pmf[1, :]))
      assert not np.any(np.isnan(pmf[2, :]))
  
imports: import numpy.testing
  from numpy.testing import assert_allclose
  import numpy
  import pytest
  from scipy import stats
  from .common_tests import check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, check_kurt_expect, check_entropy, check_private_entropy, check_edge_support, check_named_args, check_random_state_property, check_pickling, check_rvs_broadcast, check_freezing
  from scipy.stats._distr_params import distdiscrete, invdistdiscrete
  from scipy.stats._distn_infrastructure import rv_discrete_frozen
label_desc: Use image node_id 16 for calling a global function with example usage: test_integer_shapes(distname, shapename, shapes) without return types