code: def _check_column_names(data_df: pd.DataFrame):
      """Check if the column names in the provided dataframe are valid.
  
      It's not allowed to have duplicate column names or column names that are
      named ``_index``. If the column names are not valid, a ``StreamlitAPIException``
      is raised.
      """
  
      if data_df.columns.empty:
          return
  
      # Check if the column names are unique and raise an exception if not.
      # Add the names of the duplicated columns to the exception message.
      duplicated_columns = data_df.columns[data_df.columns.duplicated()]
      if len(duplicated_columns) > 0:
          raise StreamlitAPIException(
              f"All column names are required to be unique for usage with data editor. "
              f"The following column names are duplicated: {list(duplicated_columns)}. "
              f"Please rename the duplicated columns in the provided data."
          )
  
      # Check if the column names are not named "_index" and raise an exception if so.
      if INDEX_IDENTIFIER in data_df.columns:
          raise StreamlitAPIException(
              f"The column name '{INDEX_IDENTIFIER}' is reserved for the index column "
              f"and can't be used for data columns. Please rename the column in the "
              f"provided data."
          )
  
imports: from __future__ import annotations
  import json
  from dataclasses import dataclass
  from decimal import Decimal
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Mapping, Optional, Set, Tuple, TypeVar, Union, cast, overload
  import pandas
  import pyarrow
  from typing_extensions import Literal, TypeAlias, TypedDict
  from streamlit import logger
  from streamlit import type_util
  from streamlit.deprecation_util import deprecate_func_name
  from streamlit.elements.form import current_form_id
  from streamlit.elements.lib.column_config_utils import INDEX_IDENTIFIER, ColumnConfigMapping, ColumnConfigMappingInput, ColumnDataKind, DataframeSchema, apply_data_specific_configs, determine_dataframe_schema, is_type_compatible, marshall_column_config, process_config_mapping, update_column_config
  from streamlit.elements.lib.pandas_styler_utils import marshall_styler
  from streamlit.elements.utils import check_callback_rules, check_session_state_rules
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Arrow_pb2 import Arrow
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.scriptrunner import get_script_run_ctx
  from streamlit.runtime.state import WidgetArgs, WidgetCallback, WidgetKwargs, register_widget
  from streamlit.runtime.state.common import compute_widget_id
  from streamlit.type_util import DataFormat, DataFrameGenericAlias, Key, is_type, to_key
  from streamlit.util import calc_md5
label_desc: Use image node_id 8 for calling a global function with example usage: _check_column_names(data_df) without return types