Python function for a stock optimization

Job ID: 32315017

Budget: €250 – €750 EUR

It's about reducing the material waste, optimizing the boards to order from the supplier from which to cut the small board necessary for clients


I need to generate a list with smallest number of rectangles in which I can fit one or more small rectangles.


I have this input from a csv with thousands of entries like this:
client_boards
id | length | width | pcs
------------------------------------------
100 | 600 | 150 | 10
101 | 405 | 300 | 10000
102 | 630 | 580 | 5000
103 | 700 | 810 | 100



I need an output list like this:
suppliers_boards
id | length | width
------------------------------
1 | 1215 | 600
2 | 1260 | 580
3 | 1420 | 810


Some explanation

suppliers_boards id_1:
- 8 pcs of id_100, 1.25% waste
- 6 pcs of id_101, 0% waste

suppliers_boards id_2:
- 2 pcs of id_102, 0% waste

suppliers_boards id_3:
- 2 pcs of id_103, 1.41% waste

suppliers_boards:
- max length 2500
- max width 1500

waste percentage:
- between 1% and 5% (when dividing suppliers_boards into client_boards)
- the list will increse wen percentage is low, and decrese when percentage is high


[important]
length of the large rectangle must correspond to the direction of the length of the small rectangle.
I have to prioritize the boards that have a large number of pcs, because 1.5% waste from 10,000 pcs is much higher than 5% waste from 100 pcs.
must be a python function