code: def test_reshape_execution(setup):
      x = ones((1, 2, 3), chunk_size=[4, 3, 5])
      y = x.reshape(3, 2)
      res = y.execute().fetch()
      assert y.shape == (3, 2)
      np.testing.assert_equal(res, np.ones((3, 2)))
  
      data = np.random.rand(6, 4)
      x2 = tensor(data, chunk_size=2)
      y2 = x2.reshape(3, 8, order="F")
      res = y2.execute().fetch()
      expected = data.reshape((3, 8), order="F")
      np.testing.assert_array_equal(res, expected)
      assert res.flags["F_CONTIGUOUS"] is True
      assert res.flags["C_CONTIGUOUS"] is False
  
      data2 = np.asfortranarray(np.random.rand(6, 4))
      x3 = tensor(data2, chunk_size=2)
      y3 = x3.reshape(3, 8)
      res = y3.execute().fetch()
      expected = data2.reshape((3, 8))
      np.testing.assert_array_equal(res, expected)
      assert res.flags["C_CONTIGUOUS"] is True
      assert res.flags["F_CONTIGUOUS"] is False
  
      data2 = np.asfortranarray(np.random.rand(6, 4))
      x3 = tensor(data2, chunk_size=2)
      y3 = x3.reshape(3, 8, order="F")
      res = y3.execute().fetch()
      expected = data2.reshape((3, 8), order="F")
      np.testing.assert_array_equal(res, expected)
      assert res.flags["F_CONTIGUOUS"] is True
      assert res.flags["C_CONTIGUOUS"] is False
  
      for chunk_size in [None, 3]:
          rs = np.random.RandomState(0)
          data = rs.rand(3, 4, 5)
          x = tensor(data, chunk_size=chunk_size)
          x = x[x[:, 0, 0] < 0.7]
          y = x.reshape(-1, 20)
          assert np.isnan(y.shape[0])
          res = y.execute().fetch()
          expected = data[data[:, 0, 0] < 0.7].reshape(-1, 20)
          np.testing.assert_array_equal(res, expected)
  
imports: import numpy
  from ...datasource import ones, tensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_reshape_execution(setup) without return types