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 has an odd length, the first part should always be larger or equal to the second part. Return the two parts as two separate lists.
  assert divide_in_two_equal_parts([2, 3, 4, 5, 6, 7]) == ([2, 3, 4, 5], [6, 7])
  assert divide_in_two_equal_parts([1, 2, 3, 4, 5]) == ([1, 2, 3], [4, 5])
  assert divide_in_two_equal_parts([10, 20, 30, 40]) == ([10, 40], [20, 30])
  assert divide_in_two_equal_parts([1, 2, 3]) == ([1, 2], [3])
  assert divide_in_two_equal_parts([]) == ([], [])
output: def divide_in_two_equal_parts(nums):
      nums.sort()
      n = len(nums)
      if n == 0:
          return [], []
      if n == 1:
          return [nums[0]], []
      
      total_sum = sum(nums)
      half_sum = total_sum // 2
      dp = [False] * (half_sum + 1)
      dp[0] = True
      
      for num in nums:
          for i in range(half_sum, num - 1, -1):
              if dp[i - num]:
                  dp[i] = True
      
      for i in range(half_sum, -1, -1):
          if dp[i]:
              part1_sum = i
              break
      
      part1 = []
      part2 = nums[:]
      
      for num in nums:
          if part1_sum >= num and dp[part1_sum - num]:
              part1.append(num)
              part1_sum -= num
              part2.remove(num)
      
      return part1, part2