def get_prev_comment_begin_position(begin, prev_comment_begin_positions):
    """
    Args:
        begin: begin position of the argumentative component in the predictions, whose previous comment's begin position is to be found.
        prev_comment_begin_positions: A dicitionary mapping the various begin positions in the labels to the begin positions of their previous comments.
    Returns:
        The beginning position of the estimated previous comment of the current argumentative component.
        The estimated previous comment is obtained as the previous comment of the nearest argumentative component available in the label, 
        beginning before or at the same location as the argumentative component in the predictions.
    """
    begin_positions = list(prev_comment_begin_positions.keys())
    begin_positions.sort()
    prev_comment_begin_position = 0
    for elem in begin_positions:
        if elem<=begin:
            prev_comment_begin_position = prev_comment_begin_positions[elem]
        else:
            break
    return prev_comment_begin_position