def extract_attention(attention_probs, threshold):
    """
    Get a list of the tree locations being focused on at each timestep.
    
    :param attention_probs: attention probabilities; a list of vectors of length equal to the number 
                            of nodes in the input tree
    :param threshold: the probability cutoff to determine whether a node has been focused on by 
                      attention.
    """
    attention_list = []
    # Loop through list (each element corresponding to a diff node in the input tree being 
    # generated)
    for prob in attention_probs:
        important_indices = []
        # Loop through the attention values for one iteration
        for i in range(len(prob)):
            if float(prob[i]) > threshold:
                # Keep track of the indices with high attention probabilities
                important_indices.append(i)
        attention_list.append(important_indices)
    return attention_list