protected function getSectionBlocks($section_type) {
    if ($section_type == 'constructor' && isset($this->constructor)) {
      // TODO: remove this special casing.
      $this->constructor = [$this->constructor];
    }

    $code_blocks = [];
    if (!empty($this->{$section_type})) {
      foreach ($this->{$section_type} as $component_name => $lines) {
        $code_blocks[] = $lines;
      }
    }

    return $code_blocks;
  }