code: def test_pickle_preserves_name(self, index):
      original_name, index.name = index.name, "foo"
      unpickled = tm.round_trip_pickle(index)
      assert index.equals(unpickled)
      index.name = original_name
  
imports: import re
  import numpy
  import pytest
  from pandas.errors import InvalidIndexError
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestRoundTrips obj's underlying member method code with example usage: obj.test_pickle_preserves_name(index) without return types