input: Write a function to shuffle an array of integers using Python's `random.shuffle` function. The function should take an array as input and return the shuffled array. If the input array is empty, it should return an empty array.
  
  def shuffle(arr):
      if not arr:
          return []
      random.shuffle(arr)
      return arr
  
  assert shuffle([1, 5, 9, 4, 2]) != [1, 5, 9, 4, 2]
  assert shuffle([]) == []
  assert shuffle([1]) == [1] 
  assert shuffle([1, 2, 3]) != [1, 2, 3]
output: def shuffle(arr):
      if not arr:
          return []
      random.shuffle(arr)
      return arr