code: def cases_test_discrete_integer_shapes():
      # distributions parameters that are only allowed to be integral when
      # fitting, but are allowed to be real as input to PDF, etc.
      integrality_exceptions = {"nbinom": {"n"}, "betanbinom": {"n"}}
  
      seen = set()
      for distname, shapes in distdiscrete:
          if distname in seen:
              continue
          seen.add(distname)
  
          try:
              dist = getattr(stats, distname)
          except TypeError:
              continue
  
          shape_info = dist._shape_info()
  
          for i, shape in enumerate(shape_info):
              if (
                  shape.name
                  in integrality_exceptions.get(distname, set())
                  or not shape.integrality
              ):
                  continue
  
              yield distname, shape.name, shapes
  
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 15 for calling a global function with example usage: cases_test_discrete_integer_shapes() without return types