def find_subtree_indices(doc, dependency_type):
    """
    This function finds and returns the indices of the entire clause
    (each token) in the subtree to be removed.

    Args:
        doc: spaCy Doc of the clean sentence
        dependency_type:str Options are "appos", "acl", "relcl", "advcl"

    Return:
        indices_to_remove_subtree: list of indices of the subtree

    """

    # List of indices of clause tokens to be removed in the sentence
    indices_to_remove_subtree = []

    # List of unique spaCy hashes for string tokens in the doc
    # Position remains the same from original doc
    hash_ids_of_tokens = [token.orth for token in doc]

    # Iterate through the doc to get the dep clause subtree
    for index, token in enumerate(doc):

        # Check for dependency label
        if token.dep_ == dependency_type:

            # Get the indices of subtree- all tokens of the clause
            for subtree_token in token.subtree:
                # Get the unique hash id for the subtree token
                subtree_token_id = subtree_token.orth

                # Look up the token's index in the doc
                subtree_token_index_in_doc = hash_ids_of_tokens.index(subtree_token_id)

                # Add to list of indices to be removed
                indices_to_remove_subtree.append(subtree_token_index_in_doc)

    # Return list of indices
    return indices_to_remove_subtree