code: def generate_sentence(self) -> str:
          
          sentences = self._data['sentence']
          sentence = [
              self.random.choice(sentences[k]) for k
              in ('head', 'p1', 'p2', 'tail')
          ]
          return '{0} {1} {2} {3}'.format(*sentence)
docs: Generate sentence from the parts.
  
          :return: Sentence.