code: def test_partition_index_with_name():
      idx = Index(["a,b", "c,d"], name="xxx")
      result = idx.str.partition(",")
      expected = MultiIndex.from_tuples(
          [("a", ",", "b"), ("c", ",", "d")]
      )
      assert result.nlevels == 3
      tm.assert_index_equal(result, expected)
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, _testing
  from pandas.tests.strings import _convert_na_value, object_pyarrow_numpy
label_desc: Use image node_id 41 for calling a global function with example usage: test_partition_index_with_name() without return types