def build_trees_from_text( text, layer, **kwargs ):
    ''' Given a text object and the name of the layer where dependency syntactic 
        relations are stored, builds trees ( estnltk.syntax.utils.Tree objects )
        from all the sentences of the text and returns as a list of Trees.
        
        Uses the method  build_trees_from_sentence()  for acquiring trees of each
        sentence;
        
        Note that there is one-to-many correspondence between EstNLTK's sentences
        and dependency syntactic trees: one sentence can evoke multiple trees;
    '''
    from estnltk.text import Text
    assert isinstance(text, Text), \
           '(!) Unexpected text argument! Should be Estnltk\'s Text object.'
    assert layer in text, \
           '(!) The layer '+str(layer)+' is missing from the input text.'
    text_sentences = list( text.divide( layer=WORDS, by=SENTENCES ) )
    all_sentence_trees = []  # Collected sentence trees
    prev_sent_id       = -1
    #  (!) Note: if the Text object has been split into smaller Texts with split_by(),
    #      SENT_ID-s still refer to old text, and thus are not useful as indices
    #      anymore; 
    #      Therefore, we also use another variable -- norm_prev_sent_id -- that always
    #      counts sentences starting from 0, and use  SENT_ID / prev_sent_id  only for 
    #      deciding whether one sentence ends and another begins;
    norm_prev_sent_id  = -1
    current_sentence   = []
    k = 0
    while k < len( text[layer] ):
        node_desc = text[layer][k]
        if prev_sent_id != node_desc[SENT_ID] and current_sentence:
            norm_prev_sent_id += 1
            # If the index of the sentence has changed, and we have collected a sentence, 
            # then build tree(s) from this sentence
            assert norm_prev_sent_id<len(text_sentences), '(!) Sentence with the index '+str(norm_prev_sent_id)+\
                                                          ' not found from the input text.'
            sentence = text_sentences[norm_prev_sent_id]
            trees_of_sentence = \
                build_trees_from_sentence( sentence, current_sentence, layer, sentence_id=norm_prev_sent_id, \
                                           **kwargs )
            # Record trees constructed from this sentence
            all_sentence_trees.extend( trees_of_sentence )
            # Reset the sentence collector
            current_sentence = []
        # Collect sentence
        current_sentence.append( node_desc )
        prev_sent_id = node_desc[SENT_ID]
        k += 1
    if current_sentence:
        norm_prev_sent_id += 1
        assert norm_prev_sent_id<len(text_sentences), '(!) Sentence with the index '+str(norm_prev_sent_id)+\
                                                      ' not found from the input text.'
        sentence = text_sentences[norm_prev_sent_id]
        # If we have collected a sentence, then build tree(s) from this sentence
        trees_of_sentence = \
            build_trees_from_sentence( sentence, current_sentence, layer, sentence_id=norm_prev_sent_id, \
                                       **kwargs )
        # Record trees constructed from this sentence
        all_sentence_trees.extend( trees_of_sentence )
    return all_sentence_trees