code: def generate_files(dst_path):
      """
      Read all .ipynb files and produce .rst under `dst_path`
  
      Returns
      -------
      titles : dict
          Dictionary {file_basename: notebook_title, ...}
      tags : dict
          Dictionary {file_basename: set([tag1, tag2, ...]), ...}
      """
      titles = {}
      tags = {}
  
      legacy_editors = parse_wiki_legacy_users()
      created, modified = parse_wiki_legacy_timestamps()
  
      for fn in sorted(os.listdir("ipython")):
          if not fn.endswith(".ipynb"):
              continue
          fn = os.path.join("ipython", fn)
          basename = os.path.splitext(os.path.basename(fn))[0]
  
          # Get old wiki editors
          editors = list(legacy_editors.get(basename, []))
  
          # Get names from Git
          created_stamp = created.get(basename, 0)
          modified_stamp = modified.get(basename, created_stamp)
          p = subprocess.Popen(
              ["git", "log", "--format=%at:%an", "ef45029096..", fn],
              stdout=subprocess.PIPE,
              encoding="utf-8",
          )
          names, _ = p.communicate()
          for name in names.splitlines():
              timestamp, name = name.strip().split(":", 1)
              timestamp = int(timestamp)
              if name and name not in editors:
                  editors.append(name)
              if created_stamp is None:
                  created_stamp = timestamp
              if timestamp > modified_stamp:
                  modified_stamp = timestamp
  
          # Continue
          title, tagset = convert_file(
              dst_path, fn, editors, created_stamp, modified_stamp
          )
          titles[basename] = title
          if tagset:
              tags[basename] = tagset
  
      return titles, tags
  
file_path: scipy-cookbook/build.py
imports: import re
  import os
  import argparse
  import datetime
  import subprocess
  import shutil
  import lxml.html
label_desc: Use image node_id 3 for calling a global function with example usage: generate_files(dst_path) and returns: titles,  tags