classSolution:def__init__(self,nums: List[int]): self.nums = nums self.original =list(nums)defreset(self) -> List[int]:""" Resets the array to its original configuration and return it. """ self.nums = self.original self.original =list(self.original)return self.numsdefshuffle(self) -> List[int]:""" Returns a random shuffling of the array. """for i inrange(len(self.nums)): idx = random.randrange(i, len(self.nums)) self.nums[i], self.nums[idx]= self.nums[idx], self.nums[i]return self.nums