code: def _rfft_out_chunks(a, s, axes):
      """For computing the output chunks of rfft*"""
      if s is None:
          s = [a.chunks[axis][0] for axis in axes]
      s = list(s)
      s[-1] = s[-1] // 2 + 1
      chunks = list(a.chunks)
      for i, axis in enumerate(axes):
          chunks[axis] = (s[i],)
      return chunks
  
file_path: dask/dask/array/fft.py
imports: from __future__ import annotations
  import inspect
  from collections.abc import Sequence
  import numpy
  from dask.array.core import asarray
  from dask.array.core import concatenate
  from dask.array.creation import arange
  from dask.utils import derived_from, skip_doctest
label_desc: Use image node_id 2 for calling a global function with example usage: _rfft_out_chunks(a, s, axes) and returns: chunks