code: def test_reshape(self):
      shapes_in = ((3, 1, 2), (1, 4, 5), (3, 1, 1), (2, 1), (1,))
      for shape in shapes_in:
          shape = np.array(shape)
          numones = sum(shape == 1)
          inp = np.random.random(shape)
  
          fixed, swaps = ccomp.reshape_array(inp)
          shape2 = fixed.shape
          # now check that all ones are at the beginning
          for i in range(numones):
              assert shape2[i] == 1
  
          back = ccomp.undo_reshape_array(fixed, swaps)
          # check that the undo works as expected
          assert_array_equal(inp, back)
  
imports: import numpy
  from skimage.measure import label
  import skimage.measure._ccomp
  from skimage._shared import testing
  from skimage._shared.testing import assert_array_equal
label_desc: Use image node_id 1 for calling the TestSupport obj's underlying member method code with example usage: obj.test_reshape() without return types