code: def _xp_random(self, xp):
      if self.seed is None:
          return xp.random
      else:
          return xp.random.RandomState(seed=self.seed)
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy import testing
  from cupy.testing import _condition
label_desc: Use image node_id 1 for calling the TestPermutations obj's underlying member method code with example usage: obj._xp_random(xp) and returns: xp, xp