def dep_graph_parser_triplet(edge_str):
    """Given a string representing a dependency edge in the 'triplet' 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 "parent_index\tlabel\child_index"
    Returns:
        tuple of (parent_index, edge_label, child_index)
    """
    parent, label, child = edge_str.split()
    # input edge used 1-based indexing
    return (int(parent) - 1, label, int(child) - 1)