import random


def get_markets_and_values(dict_keys, values_func):
    """ Randomly choose N unique elements from dict_keys, where 1<= N <= len(dict_keys)
        For each selected elements, assign a value from value_func and return
    """
    return {k: values_func() for k in random.sample(dict_keys, random.randint(1, len(dict_keys)))}