input: Write a function in Python to check if a given array can be split into two parts with equal sum. If it is possible return True, otherwise return False. If the given array is empty, return False.
  
  def can_split_equal_sum(arr):
      n = len(arr)
      if n == 0:
          return False
      total_sum = sum(arr)
      if total_sum % 2 != 0:
          return False
      half_sum = total_sum // 2
      current_sum = 0
      
      for num in arr:
          current_sum += num
          if current_sum == half_sum:
              return True
          elif current_sum > half_sum:
              return False
      return False
  
  assert can_split_equal_sum([1, 2, 3, 4]) == True
  assert can_split_equal_sum([1, 2, 3, 4, 5]) == False
  assert can_split_equal_sum([10, -10, 10, -10]) == True
  assert can_split_equal_sum([]) == False
  assert can_split_equal_sum([2, 1, 1, 2, 1]) == True
output: def can_split_equal_sum(arr):
      n = len(arr)
      if n == 0:
          return False
      total_sum = sum(arr)
      if total_sum % 2 != 0:
          return False
      half_sum = total_sum // 2
      current_sum = 0
      
      for num in arr:
          current_sum += num
          if current_sum == half_sum:
              return True
          elif current_sum > half_sum:
              return False
      return False