code: def set_default_names(data):
      """Sets index names to 'index' for regular, or 'level_x' for Multi"""
      if com.all_not_none(*data.index.names):
          nms = data.index.names
          if len(nms) == 1 and data.index.name == "index":
              warnings.warn(
                  "Index name of 'index' is not round-trippable.",
                  stacklevel=find_stack_level(),
              )
          elif len(nms) > 1 and any(
              x.startswith("level_") for x in nms
          ):
              warnings.warn(
                  "Index names beginning with 'level_' are not round-trippable.",
                  stacklevel=find_stack_level(),
              )
          return data
  
      data = data.copy()
      if data.index.nlevels > 1:
          data.index.names = com.fill_missing_names(data.index.names)
      else:
          data.index.name = data.index.name or "index"
      return data
  
file_path: catboost/contrib/python/pandas/py3/pandas/io/json/_table_schema.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, cast
  import warnings
  from pandas._libs.json import loads
  from pandas._libs.tslibs import timezones
  from pandas._typing import DtypeObj, JSONSerializable
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.base import _registry
  from pandas.core.dtypes.common import is_bool_dtype, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_extension_array_dtype, is_integer_dtype, is_numeric_dtype, is_period_dtype, is_string_dtype, is_timedelta64_dtype
  from pandas.core.dtypes.dtypes import CategoricalDtype
  from pandas import DataFrame
  import pandas.core.common
label_desc: Use image node_id 2 for calling a global function with example usage: set_default_names(data) and returns: data, data