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 minimum. If the list cannot be divided into two equal parts (in case of an odd number of elements), the function should still try to minimize the difference between the sums of the two parts.
  assert divide_in_two_equal_parts([2, 3, 4, 5, 6, 7])==([2, 3, 6], [4, 5, 7])
  assert divide_in_two_equal_parts([1, 2, 3, 4, 5])==([1, 4, 5], [2, 3])
  assert divide_in_two_equal_parts([10, 20, 30, 40, 50])==([20, 30, 40], [10, 50])
  assert divide_in_two_equal_parts([7, 8, 9, 10, 11, 12])==([7, 8, 9, 10], [11, 12])
  assert divide_in_two_equal_parts([])==([], [])
output: def divide_in_two_equal_parts(nums):
      total_sum = sum(nums)
      n = len(nums)
      half_sum = total_sum // 2
      dp = [[False] * (half_sum + 1) for _ in range(n + 1)]
      dp[0][0] = True
  
      for i in range(1, n + 1):
          for j in range(half_sum + 1):
              if j >= nums[i - 1]:
                  dp[i][j] = dp[i - 1][j] or dp[i - 1][j - nums[i - 1]]
              else:
                  dp[i][j] = dp[i - 1][j]
  
      for j in range(half_sum, -1, -1):
          if dp[n][j]:
              part1_sum = j
              break
  
      part1, part2 = [], []
      for i in range(n, 0, -1):
          if part1_sum >= nums[i - 1] and dp[i - 1][part1_sum - nums[i - 1]]:
              part1.append(nums[i - 1])
              part1_sum -= nums[i - 1]
          else:
              part2.append(nums[i - 1])
  
      return part1[::-1], part2[::-1]