code: def _update_shape(a, shape):
      if shape is None and a is not None:
          shape = a.shape
      elif isinstance(shape, int):
          shape = (shape,)
      else:
          shape = tuple(shape)
      return shape
  
file_path: cupy/cupyx/_pinned_array.py
imports: import numpy
  from cupy import cuda
  from cupy._creation.basic import _new_like_order_and_strides
  from cupy._core import internal
label_desc: Use image node_id 1 for calling a global function with example usage: _update_shape(a, shape) and returns: shape