code: def test_shape_4d(self):
      # All possible permutations for bins of different lengths in 4D.
      bins = (
          (7, 4, 5, 6),
          (4, 5, 7, 6),
          (5, 6, 4, 7),
          (7, 6, 5, 4),
          (5, 7, 6, 4),
          (4, 6, 7, 5),
          (6, 5, 7, 4),
          (7, 5, 4, 6),
          (7, 4, 6, 5),
          (6, 4, 7, 5),
          (6, 7, 5, 4),
          (4, 6, 5, 7),
          (4, 7, 5, 6),
          (5, 4, 6, 7),
          (5, 7, 4, 6),
          (6, 7, 4, 5),
          (6, 5, 4, 7),
          (4, 7, 6, 5),
          (4, 5, 6, 7),
          (7, 6, 4, 5),
          (5, 4, 7, 6),
          (5, 6, 7, 4),
          (6, 4, 5, 7),
          (7, 5, 6, 4),
      )
  
      r = np.random.rand(10, 4)
      for b in bins:
          H, edges = histogramdd(r, b)
          assert_(H.shape == b)
  
imports: import numpy
  from numpy.lib.histograms import histogram, histogramdd, histogram_bin_edges
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, assert_allclose, assert_array_max_ulp, assert_raises_regex, suppress_warnings
  from numpy.testing._private.utils import requires_memory
  import pytest
label_desc: Use image node_id 3 for calling the TestHistogramdd obj's underlying member method code with example usage: obj.test_shape_4d() without return types