code: def _numpy_array_to_pil_image(x):
      """
      convert x of shape (1, 3, H, W) to PIL image
      """
      assert len(x.shape) == 4
      assert list(x.shape[:2]) == [1, 3]
      x = x[0, :, :, :]  # (3, H, W)
      x = _np.transpose(x, [1, 2, 0])  # (H, W, 3)
      x = x.astype(_np.uint8)
      return PIL.Image.fromarray(x)
  
imports: import itertools
  import os
  import tempfile
  import numpy
  import PIL.Image
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TF_2, _HAS_TORCH, MSG_TF2_NOT_FOUND, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.testing_reqs import backends, compute_units
label_desc: Use image node_id 1 for calling a global function with example usage: _numpy_array_to_pil_image(x) and returns: PIL