code: def _make_output_code_blocks(md):
      lines = md.split("\n")
      output_lines = []
      final_lines = []
      is_inside_backticks = False
  
      def is_output_line(line, prev_line, output_lines):
          if line.startswith("    ") and len(line) >= 5:
              if output_lines or (
                  lines[i - 1].strip() == "" and line.strip()
              ):
                  return True
          return False
  
      def flush(output_lines, final_lines):
          final_lines.append('<div class="k-default-codeblock">')
          final_lines.append("```")
          if len(output_lines) == 1:
              line = output_lines[0]
              final_lines.append(line[4:])
          else:
              for line in output_lines:
                  final_lines.append(line[4:])
          final_lines.append("```")
          final_lines.append("</div>")
  
      for i, line in enumerate(lines):
          if line.startswith("```"):
              is_inside_backticks = not is_inside_backticks
              final_lines.append(line)
              continue
  
          if is_inside_backticks:
              final_lines.append(line)
              continue
  
          if i > 0 and is_output_line(line, lines[-1], output_lines):
              output_lines.append(line)
          elif not line:
              if output_lines:
                  if output_lines[-1]:
                      output_lines.append(line)
              else:
                  final_lines.append(line)
          else:
              if output_lines:
                  flush(output_lines, final_lines)
                  output_lines = []
              final_lines.append(line)
      if output_lines:
          flush(output_lines, final_lines)
      return "\n".join(final_lines)
  
file_path: autokeras/docs/tutobooks.py
imports: import json
  import os
  import random
  import shutil
  import sys
  from pathlib import Path
label_desc: Use image node_id 10 for calling a global function with example usage: _make_output_code_blocks(md) and returns: str, False, True