code: def test_rsplit_to_multiindex_expand():
      idx = Index(["some_equal_splits", "with_no_nans"])
      result = idx.str.rsplit("_", expand=True)
      exp = MultiIndex.from_tuples(
          [("some", "equal", "splits"), ("with", "no", "nans")]
      )
      tm.assert_index_equal(result, exp)
      assert result.nlevels == 3
  
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 26 for calling a global function with example usage: test_rsplit_to_multiindex_expand() without return types