input: Write a function to divide a given list of numbers into two equal parts such that the difference between the sum of the two parts is minimized. If it is not possible to split the list into exactly two equal parts, the function should still aim to minimize the difference.
  assert divide_in_two_equal_parts([2, 3, 4, 5, 6, 7])==([2, 3, 7], [4, 5, 6])
  assert divide_in_two_equal_parts([1, 2, 3, 4, 5])==([1, 2, 5], [3, 4])
  assert divide_in_two_equal_parts([1, 1, 2, 2])==([1, 2], [1, 2])
  assert divide_in_two_equal_parts([10, 20, 30, 40])==([10, 40], [20, 30])
  assert divide_in_two_equal_parts([])==([], [])
output: def divide_in_two_equal_parts(nums):
      total_sum = sum(nums)
      n = len(nums)
      if n == 0:
          return [], []
      
      def helper(index, sum1, sum2, part1, part2):
          if index == n:
              return abs(sum1 - sum2), part1, part2
          
          diff1, p1, p2 = helper(index + 1, sum1 + nums[index], sum2, part1 + [nums[index]], part2)
          diff2, q1, q2 = helper(index + 1, sum1, sum2 + nums[index], part1, part2 + [nums[index]])
          
          if diff1 < diff2:
              return diff1, p1, p2
          else:
              return diff2, q1, q2
      
      _, part1, part2 = helper(0, 0, 0, [], [])
      return part1, part2