from typing import List


def get_combinations(candidates: List[int], target: int) -> List[List[int]]:
    """Returns a list of lists representing each possible set of drops.

    This function (and its recursive helper function) was adapted from
    https://wlcoding.blogspot.com/2015/03/combination-sum-i-ii.html.

    Args:
        candidates: A list of possible numbers of pieces to drop on a square.  Effectively, this
            arg is equivalent to range(1, carry_size + 1).
        target: The number of stones in the carry_size.  The number of dropped stones must equal the
            number of stones picked up.

    Returns:
        A list of lists of possible combinations.  Note that these lists do not contain every
        permutation of drops, merely every combination of valid ints that sums to the target value.
    """
    def get_combinations_rec(candidates, target, index, partial_sum, list_t, combinations) -> None:
        """A recursive helper function for get_combinations."""
        if partial_sum == target:
            combinations.append(list(list_t))
        for i in range(index, len(candidates)):
            if partial_sum + candidates[i] > target:
                break
            list_t.append(candidates[i])
            get_combinations_rec(
                candidates, target, i, partial_sum+candidates[i], list_t, combinations
            )
            list_t.pop()

    combinations: List = []
    get_combinations_rec(candidates, target, 0, 0, [], combinations)
    return combinations