code: def _apply_index_type(obj, attr, header):
      import cudf
  
      multi_index_cls = (
          pd.MultiIndex
          if header["index_type"] == "pandas"
          else cudf.MultiIndex
      )
      original_index = getattr(obj, attr)
      if isinstance(original_index, (pd.MultiIndex, cudf.MultiIndex)):
          return
      new_index = multi_index_cls.from_tuples(
          original_index, names=header["names"]
      )
      setattr(obj, attr, new_index)
  
file_path: mars/mars/serialization/cuda.py
imports: from typing import Any, List, Dict, Tuple
  import pandas
  from ..utils import lazy_import
  from .core import Serializer, buffered
label_desc: Use image node_id 2 for calling the CudfSerializer obj's underlying member method code with example usage: obj._apply_index_type(obj, attr, header) without return types