from typing import List
from typing import Any
import random


def get_random_sample(items: List[Any], k: int) -> List[Any]:
    """
    Thin wrapper around ``random.sample`` that takes the min of ``k`` and ``len(items)``
    when sampling, so as to avoid a ``ValueError``.
    """
    return random.sample(items, min(k, len(items)))