code: def generate_custom_files():
      """Generating contents in the ``howto`` folder,
      based on the ``ntlk/test/*.doctest`` files, as well
      as contents in the ``team`` folder, based on
      ``team.json``.
      """
      import glob
      import json
      import re
  
      from jinja2 import Template
  
      modules = []
  
      web_folder = os.path.dirname(os.path.abspath(__file__))
      howto_folder = os.path.join(web_folder, "howto")
      if not os.path.exists(howto_folder):
          os.makedirs(howto_folder)
  
      # Load jinja template
      with open(
          os.path.join(web_folder, "_templates", "doctest.rst"),
          encoding="utf8",
      ) as f:
          doctest_template = Template(f.read())
  
      print("Generating HOWTO pages...")
      # Iterate over .doctest files, and find the module_name.
      pattern = re.compile(r"(\w+)\.doctest$")
      for path in glob.glob(
          os.path.join(web_folder, "..", "nltk", "test", "*.doctest")
      ):
          match = pattern.search(path)
          module_name = match.group(1)
          # Ignore index.doctest, we already have an index, i.e. howto.rst
          if module_name == "index":
              continue
          # Write .rst files based on the doctest_template.
          doctest_template.stream(module_name=module_name).dump(
              os.path.join(howto_folder, f"{module_name}.rst")
          )
          modules.append(module_name)
  
      print(f"Generated {len(modules)} HOWTO pages.")
  
      # Load the team JSON data
      with open(
          os.path.join(web_folder, "team", "team.json"), encoding="utf8"
      ) as f:
          full_data = json.load(f)
      print("Team data loaded!")
  
      # Load the team jinja template
      with open(
          os.path.join(web_folder, "_templates", "team.html"),
          encoding="utf8",
      ) as f:
          team_template = Template(f.read())
  
      for members_type, members_data in full_data.items():
          team_template.stream(members=members_data).dump(
              os.path.join(
                  web_folder, "team", f"{members_type}_team.html"
              )
          )
          print(f"{members_type.title()} team HTML page written!")
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_custom_files() without return types