code: def _convert_to_nhwc_layout(array):
      # Converts a contiguous array to NHWC data layout.
      assert isinstance(array, numpy.ndarray)
      assert array.flags.c_contiguous
      shape = array.shape
      transposed_array = numpy.transpose(array, (0, 3, 1, 2))
      transposed_array = numpy.ascontiguousarray(transposed_array)
      array = numpy.transpose(transposed_array, (0, 2, 3, 1))
      assert array.shape == shape
      return array
  
imports: import unittest
  import chainer
  from chainer import functions
  import numpy
  import pytest
  import chainerx
  from chainerx_tests import array_utils
  from chainerx_tests import dtype_utils
  from chainerx_tests import op_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _convert_to_nhwc_layout(array) and returns: array