code: def index_fillna(index, value=None, downcast=None):
      """
      Fill NA/NaN values with the specified value.
  
      Parameters
      ----------
      value : scalar
          Scalar value to use to fill holes (e.g. 0).
          This value cannot be a list-likes.
      downcast : dict, default is None
          A dict of item->dtype of what to downcast if possible,
          or the string 'infer' which will try to downcast to an appropriate
          equal type (e.g. float64 to int64 if possible).
  
      Returns
      -------
      Index
  
      See Also
      --------
      DataFrame.fillna : Fill NaN values of a DataFrame.
      Series.fillna : Fill NaN Values of a Series.
      """
      if isinstance(value, (list, pd.Series, SERIES_TYPE)):
          raise ValueError(
              "'value' must be a scalar, passed: %s" % type(value)
          )
  
      use_inf_as_na = options.dataframe.mode.use_inf_as_na
      op = FillNA(
          value=value,
          downcast=downcast,
          use_inf_as_na=use_inf_as_na,
          output_types=get_output_types(index),
      )
      return op(index)
  
imports: import itertools
  import numpy
  import pandas
  from ...None import opcodes
  from ...config import options
  from ...core import ENTITY_TYPE, Entity, OutputType, get_output_types
  from ...core.operand import OperandStage
  from ...serialization.serializables import StringField, AnyField, BoolField, Int64Field
  from ..align import align_dataframe_dataframe, align_dataframe_series, align_series_series
  from ..core import DATAFRAME_TYPE, SERIES_TYPE
  from ..operands import DataFrameOperandMixin, DataFrameOperand
  from ..utils import validate_axis
label_desc: Use image node_id 4 for calling a global function with example usage: index_fillna(index, value, downcast) and returns: op