code: def _shape_after_indexing(
      outer_shape: tuple[int, ...],
      idx: tuple[slice, ...],
  ) -> tuple[int, ...]:
      shape = list(outer_shape)
      for i in range(len(idx)):
          start, stop, step = idx[i].indices(shape[i])
          shape[i] = (stop - start - 1) // step + 1
      return tuple(shape)
  
file_path: cupy/cupyx/distributed/array/_index_arith.py
imports: import typing
  from typing import Any, Optional
label_desc: Use image node_id 7 for calling a global function with example usage: _shape_after_indexing(outer_shape, idx) and returns: tuple