def dep_graph_parser_parenthesis(edge_str):
    """Given a string representing a dependency edge in the 'parenthesis'
    format, return a tuple of (parent_index, edge_label, child_index).

    Args:
        edge_str: a string representation of an edge in the dependency tree, in
        the format edge_label(parent_word-parent_index, child_word-child_index)
    Returns:
        tuple of (parent_index, edge_label, child_index)
    """
    tokens = edge_str.split("(")
    label = tokens[0]
    tokens = tokens[1].split(", ")
    parent = int(tokens[0].split("-")[-1]) - 1
    child = int(",".join(tokens[1:]).split("-")[-1][:-1]) - 1
    return (parent, label, child)