input: Write a function to find the maximum element in the given array. The function should take a list as input and return the maximum value in the list. If the list is empty, it should return None.
  assert find_max_element([1, 10, 50, 3, 8])==50
  assert find_max_element([3, 5, 10, 1, 2])==10
  assert find_max_element([4, 3, 1, 2])==4
  assert find_max_element([3, 5, 4, 1, 2])==5
  assert find_max_element([])==None
output: def find_max_element(arr):
      if not arr:
          return None
      return max(arr)