code: def test_delete_preserves_rangeindex(self):
      idx = Index(range(2), name="foo")
  
      result = idx.delete([1])
      expected = Index(range(1), name="foo")
      tm.assert_index_equal(result, expected, exact=True)
  
      result = idx.delete(1)
      tm.assert_index_equal(result, expected, exact=True)
  
imports: import numpy
  import pytest
  from pandas.core.dtypes.common import ensure_platform_int
  import pandas
  from pandas import Index, RangeIndex
  import pandas._testing
label_desc: Use image node_id 12 for calling the TestRangeIndex obj's underlying member method code with example usage: obj.test_delete_preserves_rangeindex() without return types