from typing import List
import random


def _get_random_costs(n_instants: int, items_per_instant: int, cost_dim: int) -> List[List[List[float]]]:
    """Generates the list of items costs randomly.
    """
    weights: List[List[List[float]]] = [[] for _ in range(n_instants)]
    for t in weights:
        for _ in range(items_per_instant):
            t.append([random.random() for _ in range(cost_dim)])
    return weights