code: def _clean_names_single_object(
      obj: Union[pd.Index, pd.Series],
      enforce_string,
      case_type,
      remove_special,
      strip_accents,
      strip_underscores,
      truncate_limit,
  ):
      """
      Apply _clean_names on a single pandas object.
      """
      if enforce_string and not (_is_str_or_cat(obj)):
          obj = obj.astype(str)
      obj = _change_case(obj, case_type)
      obj = _normalize_1(obj)
      if remove_special:
          obj = obj.map(_remove_special)
      if strip_accents:
          obj = obj.map(_strip_accents)
      obj = obj.str.replace(pat="_+", repl="_", regex=True)
      obj = _strip_underscores_func(
          obj, strip_underscores=strip_underscores
      )
      if truncate_limit:
          obj = obj.str[:truncate_limit]
      return obj
  
file_path: pyjanitor/janitor/functions/clean_names.py
imports: import unicodedata
  from typing import Hashable, Optional, Union
  import pandas
  import pandas_flavor
  from pandas.api.types import is_scalar
  from janitor.errors import JanitorError
  from janitor.functions.utils import _is_str_or_cat, get_index_labels
  from janitor.utils import deprecated_alias
label_desc: Use image node_id 2 for calling a global function with example usage: _clean_names_single_object(obj, enforce_string, case_type, remove_special, strip_accents, strip_underscores, truncate_limit) and returns: obj