/**
  * @param ParsingState $parsingState
  * @return string
  */
 protected function generateSectionCodeFromParsingState(ParsingState $parsingState)
 {
     $generatedRenderFunctions = '';
     if ($parsingState->getVariableContainer()->exists('sections')) {
         $sections = $parsingState->getVariableContainer()->get('sections');
         // TODO: refactor to $parsedTemplate->getSections()
         foreach ($sections as $sectionName => $sectionRootNode) {
             $generatedRenderFunctions .= $this->generateCodeForSection($this->nodeConverter->convertListOfSubNodes($sectionRootNode), 'section_' . sha1($sectionName), 'section ' . $sectionName);
         }
     }
     return $generatedRenderFunctions;
 }