def create_cluster_info(cluster_names, sub_keys, values):
    """
    Convenience method for preparing the input parameters cluster_labels and metrics
    of `create_default_environment()`.

    The sub-keys can for example be thought of as
    metric names (and `values` their weights) or
    cluster label names (and `values` their values).

    Example:
        Sample input:
            cluster_names = ["cluster1", "cluster2", "cluster3"]
            sub_keys = ["m1", "m2"]
            values = [3, 4]
        Return value:
            {
                "cluster1": {
                    "m1": 3,
                },
                "cluster2": {
                    "m2": 4,
                },
                "cluster3": {},
            }

    If sub_keys is not a list, the list will be constructed as follows:
        sub_keys = [sub_keys] * len(values)
    This is useful when the sub-key should be the same for all clusters.

    The ith cluster will get the ith sub-key with the ith value.
    Caveat: If there are fewer sub-keys and values than clusters,
    the last cluster(s) will not become any <sub-key, value> pairs at all.

    Limitation:
        Each cluster can only have one <sub-key, value> pair using this method.

    Args:
        cluster_names (list[str]): The keys in the return dict.
        sub_keys: The keys in the second level dicts in the return dict.
            If type(sub_keys) isn't list, a list will be created as such:
                sub_keys = [sub_keys] * len(values)
        values (list): The values in the second level dicts in the return dict.

    Returns:
        dict[str, dict] with same length as cluster_names.
            The first `len(values)` <key, value> pairs will be:
                cluster_names[i]: {sub_keys[i]: values[i]}
            The last `len(cluster_names) - len(values)` <key: value> pairs will be:
                cluster_names[i]: {}

    Asserts:
        len(cluster_names) >= len(values)
        len(sub_keys) == len(values) if type(sub_keys) is list

    """
    if not type(sub_keys) is list:
        sub_keys = [sub_keys] * len(values)

    assert len(cluster_names) >= len(values)
    assert len(sub_keys) == len(values)

    cluster_dicts = [{sub_keys[i]: values[i]} for i in range(len(values))]
    cluster_dicts += [{}] * (len(cluster_names) - len(values))

    return dict(zip(cluster_names, cluster_dicts))