code: def hamming_window(
      window_length: int,
      *,
      periodic: bool = True,
      alpha: float = 0.54,
      beta: float = 0.46,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Compute the Hamming window with window length window_length.
  
      Parameters
      ----------
      window_length
          an int defining the length of the window.
      periodic
           If True, returns a window to be used as periodic function.
           If False, return a symmetric window.
      alpha
          The coefficient alpha in the hamming window equation
      beta
          The coefficient beta in the hamming window equation
      dtype
          data type of the returned array.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          The array containing the window.
  
      Examples
      --------
      >>> ivy.hamming_window(5)
      ivy.array([0.0800, 0.3979, 0.9121, 0.9121, 0.3979])
      >>> ivy.hamming_window(5, periodic=False)
      ivy.array([0.0800, 0.5400, 1.0000, 0.5400, 0.0800])
      >>> ivy.hamming_window(5, periodic=False, alpha=0.2, beta=2)
      ivy.array([-1.8000,  0.2000,  2.2000,  0.2000, -1.8000])
      """
      if window_length < 2:
          return ivy.ones([window_length], dtype=dtype, out=out)
      if periodic:
          count = ivy.arange(window_length) / window_length
      else:
          count = ivy.linspace(0, window_length, window_length)
      result = (alpha - beta * ivy.cos(2 * ivy.pi * count)).astype(
          dtype
      )
      if ivy.exists(out):
          result = ivy.inplace_update(out, result)
      return result
  
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 5 for calling a global function with example usage: hamming_window(window_length) and returns: result, ivy