code: def find_notebooks(directory=None):
      if directory is None:
          directory = SOURCE_DIR
      nbs = (
          os.path.join(directory, x)
          for x in os.listdir(directory)
          if x.endswith(".ipynb")
      )
      return nbs
  
file_path: statsmodels/tools/nbgenerate.py
imports: import argparse
  import asyncio
  from functools import partial
  import hashlib
  import json
  import os
  import shutil
  import sys
  from colorama import Fore, init
  from nbconvert import HTMLExporter, RSTExporter
  from nbconvert.preprocessors import ExecutePreprocessor
  import nbformat
label_desc: Use image node_id 3 for calling a global function with example usage: find_notebooks(directory) and returns: nbs