input: Write a function to replace elements in an array according to the following rules: if the element is divisible by 3, replace it with "Fizz"; if the element is divisible by 5, replace it with "Buzz"; if the element is divisible by both 3 and 5, replace it with "FizzBuzz". Otherwise, keep the element as is. Return the modified 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([1, 15, 3, 10, 6, 5])==['1', 'FizzBuzz', 'Fizz', 'Buzz', 'Fizz', 'Buzz']
  assert fizz_buzz([7, 8, 9, 10])==['7', '8', 'Fizz', 'Buzz']
  assert fizz_buzz([30, 3])==['FizzBuzz', 'Fizz']
  assert fizz_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