import random


def get_random_action_by_class(action_class):
    """
    Get an instance of the given :class:`Action`, randomly chosen from the set
    its :func:`Action.get_option_set` produces.
    :return: An instance of ``action_class``.
    """
    option_set = action_class.get_option_set()
    choice = random.choice(list(option_set))
    return choice