code: def hann_window(
      size: int,
      *,
      periodic: bool = True,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Generate a Hann window. The Hanning window is a taper formed by using a
      weighted cosine.
  
      Parameters
      ----------
      size
          the size of the returned window.
      periodic
          If True, returns a window to be used as periodic function.
          If False, return a symmetric window.
      dtype
          The data type to produce. Must be a floating point type.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          The array containing the window.
  
      Examples
      --------
      >>> ivy.hann_window(4, periodic = True)
      ivy.array([0. , 0.5, 1. , 0.5])
  
      >>> ivy.hann_window(7, periodic = False)
      ivy.array([0.  , 0.25, 0.75, 1.  , 0.75, 0.25, 0.  ])
      """
      return ivy.current_backend().hann_window(
          size, periodic=periodic, dtype=dtype, out=out
      )
  
imports: from typing import Union, Tuple, Optional, Sequence, Iterable, Generator
  import warnings
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.utils.exceptions import handle_exceptions
  from ivy.func_wrapper import outputs_to_ivy_arrays, handle_nestable, to_native_arrays_and_back, handle_out_argument, infer_dtype, handle_array_like_without_promotion, inputs_to_ivy_arrays, handle_device, handle_backend_invalid, handle_array_function
label_desc: Use image node_id 2 for calling a global function with example usage: hann_window(size) and returns: ivy