def store_metrics(retrieved_metrics, yaml_metrics, family_objects):
    """Store the metrics in the families to be exported.
    Takes the retrieved metrics, the known metrics from the YAML file, and the
    previously created families.
    Returns the dictionary with the metrics inserted.
    """
    for metric_group in retrieved_metrics:
        for resource in retrieved_metrics[metric_group]:
            for metric in retrieved_metrics[metric_group][resource]:
                # ZHMC: 100% means 100, Prometheus: 100% means 1
                if yaml_metrics[metric_group][metric]["percent"]:
                    retrieved_metrics[metric_group][resource][metric] /= 100
                family_objects[metric_group][metric].add_metric(
                    [resource],
                    retrieved_metrics[metric_group][resource][metric])
    return family_objects