code: def _flatten_structure(
      d: Dict[str, Any], separator: str, depth: int, use_html: bool
  ) -> str:
      """Recursively flatten the structure."""
      texts = []
      title = d["section_title"]
      if use_html:
          texts.append(f"<h{depth}>{title}</h{depth}>")
      else:
          texts.append(title)
      texts.extend(d["paragraphs"])
      texts.extend(
          [
              _flatten_structure(s, separator, depth + 1, use_html)
              for s in d["subsections"]
          ]
      )
      return separator.join(texts)
  
file_path: datasets/tensorflow_datasets/summarization/gov_report/gov_report.py
imports: import itertools
  import json
  import os
  from typing import Any, Dict, Iterable, Tuple
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: _flatten_structure(d, separator, depth, use_html) and returns: separator