code: def _view_wrapper(f, arr_dtype=None, out_dtype=None, fill_wrap=None):
      def wrapper(
          arr: np.ndarray,
          indexer: np.ndarray,
          out: np.ndarray,
          fill_value=np.nan,
      ) -> None:
          if arr_dtype is not None:
              arr = arr.view(arr_dtype)
          if out_dtype is not None:
              out = out.view(out_dtype)
          if fill_wrap is not None:
              # FIXME: if we get here with dt64/td64 we need to be sure we have
              #  matching resos
              if fill_value.dtype.kind == "m":
                  fill_value = fill_value.astype("m8[ns]")
              else:
                  fill_value = fill_value.astype("M8[ns]")
              fill_value = fill_wrap(fill_value)
  
          f(arr, indexer, out, fill_value=fill_value)
  
      return wrapper
  
imports: from __future__ import annotations
  import functools
  from typing import TYPE_CHECKING, cast, overload
  import numpy
  from pandas._libs import algos, lib
  from pandas.core.dtypes.cast import maybe_promote
  from pandas.core.dtypes.common import ensure_platform_int, is_1d_only_ea_dtype
  from pandas.core.dtypes.missing import na_value_for_dtype
  from pandas.core.construction import ensure_wrapped_if_datetimelike
label_desc: Use image node_id 9 for calling a global function with example usage: _view_wrapper(f, arr_dtype, out_dtype, fill_wrap) and returns: wrapper