import random


def sample_minor_versions(versions, sample):
    """
    Pick randomly a sample from the given versions.

    :param versions: A list of valid semver strings.
    :param sample: The number of versions to choose from the available versions.
    """

    minors = []
    for version in versions:
        major, minor, patch = version.split('.')
        if minor != '0' or patch != '0':
            minors.append(version)

    random.shuffle(minors)

    return minors[-sample:]