def get_act_sent_len(head_indexes_2d):
    """ Get actual sentence length (counting only head indexes)  """
    sent_len_list = [0] * len(head_indexes_2d)
    
    for idx, head_list in enumerate(head_indexes_2d):
        sent_len = 0
        for item in head_list:
            if item != 0:
                sent_len += 1
        sent_len_list[idx] = sent_len
    return sent_len_list