def coding_problem_36(tree):
    """
    Given the root to a binary search tree, find the second largest node in the tree.
    Example:

    >>> tree = [9, [4, [1, None, None], [7, [5, None, None], None]], [31, [14, None, None], [82, None, None]]]
    >>> coding_problem_36(tree)
    31

    Note: in a binary search tree, the second largest node is the root of the largest element.
    """
    value, _, right = tree
    parent = value
    while right:
        parent = value
        value, _, right = right
    return parent