code: def infer_fill_value(val):
      """
      infer the fill value for the nan/NaT from the provided
      scalar/ndarray/list-like if we are a NaT, return the correct dtyped
      element to provide proper block construction
      """
      if not is_list_like(val):
          val = [val]
      val = np.array(val, copy=False)
      if needs_i8_conversion(val.dtype):
          return np.array("NaT", dtype=val.dtype)
      elif is_object_dtype(val.dtype):
          dtype = lib.infer_dtype(ensure_object(val), skipna=False)
          if dtype in ["datetime", "datetime64"]:
              return np.array("NaT", dtype=DT64NS_DTYPE)
          elif dtype in ["timedelta", "timedelta64"]:
              return np.array("NaT", dtype=TD64NS_DTYPE)
      return np.nan
  
imports: from __future__ import annotations
  from decimal import Decimal
  from functools import partial
  from typing import TYPE_CHECKING, overload
  import numpy
  from pandas._config import get_option
  from pandas._libs import lib
  import pandas._libs.missing
  from pandas._libs.tslibs import NaT, iNaT
  from pandas.core.dtypes.common import DT64NS_DTYPE, TD64NS_DTYPE, ensure_object, is_bool_dtype, is_categorical_dtype, is_complex_dtype, is_dtype_equal, is_extension_array_dtype, is_float_dtype, is_integer_dtype, is_object_dtype, is_scalar, is_string_or_object_np_dtype, needs_i8_conversion
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PeriodDtype
  from pandas.core.dtypes.generic import ABCDataFrame, ABCExtensionArray, ABCIndex, ABCMultiIndex, ABCSeries
  from pandas.core.dtypes.inference import is_list_like
label_desc: Use image node_id 23 for calling a global function with example usage: infer_fill_value(val) and returns: np, np, np, np