input: Write a function to replace elements in an array according to the following rules: if an element is divisible by 3, replace it with "Fizz"; if an element is divisible by 5, replace it with "Buzz"; if an element is divisible by both 3 and 5, replace it with "FizzBuzz". For any other element, keep it unchanged. The function should return the modified array. If the input array is empty, return an empty array.
  def fizz_buzz(arr):
      new_arr = []
      for element in arr:
          if element % 3 == 0 and element % 5 == 0:
              new_arr.append("FizzBuzz")
          elif element % 3 == 0:
              new_arr.append("Fizz")
          elif element % 5 == 0:
              new_arr.append("Buzz")
          else:
              new_arr.append(element)
      return new_arr
  
  assert fizz_buzz([2, 3, 4, 5, 6, 15]) == [2, "Fizz", 4, "Buzz", "Fizz", "FizzBuzz"]
  assert fizz_buzz([]) == []
  assert fizz_buzz([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz"]
  assert fizz_buzz([30, 31, 32, 33, 34, 35]) == ["FizzBuzz", 31, 32, "Fizz", 34, "Buzz"]
  assert fizz_buzz([5, 10, 15, 20]) == ["Buzz", "Buzz", "FizzBuzz", "Buzz"]
output: def fizz_buzz(arr):
      new_arr = []
      for element in arr:
          if element % 3 == 0 and element % 5 == 0:
              new_arr.append("FizzBuzz")
          elif element % 3 == 0:
              new_arr.append("Fizz")
          elif element % 5 == 0:
              new_arr.append("Buzz")
          else:
              new_arr.append(element)
      return new_arr