code: def _permute(obj):
      return obj.take(np.random.default_rng(2).permutation(len(obj)))
  
file_path: pandas/pandas/tests/indexes/period/test_setops.py
imports: import numpy
  import pytest
  import pandas
  from pandas import PeriodIndex, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 1 for calling a global function with example usage: _permute(obj) and returns: obj