import math


def icosahedron_order_calculator(nodes):
    """Calculate the order of a icosahedron graph
    for a given number of nodes.

    Args:
        nodes (int): number of nodes in icosahedron sampling

    Returns:
        int: order for the matching icosahedron graph
    """
    order = math.log((nodes - 2) / 10) / math.log(4)
    return order