code: def _unpack_arrays(self, xp, packed_array, shapes):
      # Unpacks a flattened-and-concatenated array into original shapes.
      # Shapes may include None.
      assert packed_array.ndim == 1
      n = len(shapes)
  
      # For simplicity omit None from the shapes. They're recovered later.
      none_indices = [
          i for i, shape in enumerate(shapes) if shape is None
      ]
      shapes = [shape for shape in shapes if shape is not None]
  
      # Unpack the array into given shapes
      sizes = [int(numpy.prod(shape)) for shape in shapes]
      cumsizes = numpy.cumsum(sizes)
      unpacked_arrays = [
          packed_array[cumsize - size : cumsize].reshape(shape)
          for cumsize, size, shape in zip(cumsizes, sizes, shapes)
      ]
  
      # Recover Nones
      for i in none_indices:
          unpacked_arrays.insert(i, None)
  
      assert len(unpacked_arrays) == n
      return tuple(unpacked_arrays)
  
imports: from __future__ import absolute_import
  import warnings
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import _cpu
  from chainer.backends import cuda
  from chainer import configuration
  from chainer import testing
  from chainer import utils
  from chainer import variable
  import chainerx
label_desc: Use image node_id 7 for calling the _CheckBackward obj's underlying member method code with example usage: obj._unpack_arrays(xp, packed_array, shapes) and returns: tuple