input: Write a function to shuffle the elements of an array of integers using the Python `random` library. The function should return the shuffled array. If the array is empty, the function should return an empty array.
  assert shuffle([1, 5, 9, 4, 2]) in [[1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2], [1, 5, 9, 4, 2]]
  assert shuffle([])==[]
output: import random
  
  def shuffle(arr):
      if not arr:
          return []
      shuffled_arr = arr[:]
      random.shuffle(shuffled_arr)
      return shuffled_arr