code: def _cook_nd_args(a, s=None, axes=None, invreal=0):
      if s is None:
          shapeless = 1
          if axes is None:
              s = list(a.shape)
          else:
              s = take(a.shape, axes)
      else:
          shapeless = 0
      s = list(s)
      if axes is None:
          axes = range(-len(s), 0)
      if len(s) != len(axes):
          raise ValueError("Shape and axes have different lengths.")
      if invreal and shapeless:
          # Here is the fix. The following line is replaced
          # (see numpy commit 88a02920daf0b408086106439c53bd488e73af29):
          # s[axes[-1]] = (s[axes[-1]] - 1) * 2
          s[-1] = (a.shape[axes[-1]] - 1) * 2
      return s, axes
  
label_desc: Use image node_id 1 for calling a global function with example usage: _cook_nd_args(a, s, axes, invreal) and returns: s,  axes