def store_runtime_stats(data, nodes, stats):
    """Store the runtime stats in a dictionary.

    Parameters
    ----------
    data : dictionary
        Runtime data of the series.
    nodes : integer
        Number of nodes used for the series.
    stats : tuple or list of 3 floats
        Smallest, biggest, and mean runtimes of the series.

    """
    data['nodes'].append(nodes)
    data['min'].append(stats[0])
    data['max'].append(stats[1])
    data['means'].append(stats[2])
    return data