I have k sets of items. I want to choose n items from each set, $n \cdot k$ items total.
I would like to choose the $n \cdot k$ items under some optimization criterion, e.g. that the sum of the $\ell_1$ distance between every pair of items is maximized.
I am okay slightly relaxing the criterion that $n$ items must be drawn from each set, as long as $n \cdot k$ items total are chosen.
What is this kind of optimization specifically? Where can I find an implementation, preferably a python implementation?