code: def append_scrapbook_commands(
      input_nb_path, output_nb_path, scrap_specs
  ):
      notebook = nbf.read(input_nb_path, as_version=4)
      notebook = nbf.v4.upgrade(notebook, from_version=4, from_minor=2)
  
      scrapbook_cells = []
      # Always need to import nteract-scrapbook
      scrapbook_cells.append(
          nbf.v4.new_code_cell(source="import scrapbook as sb")
      )
  
      # Create a cell to store each key and value in the scrapbook
      for k, v in scrap_specs.items():
          source = 'sb.glue("{0}", {1})'.format(k, v.code)
          scrapbook_cells.append(nbf.v4.new_code_cell(source=source))
  
      # Append the cells to the notebook
      [notebook["cells"].append(c) for c in scrapbook_cells]
  
      # Write out the new notebook
      nbf.write(notebook, output_nb_path)
  
imports: import os
  import nbformat
  import papermill
  import pytest
  import scrapbook
label_desc: Use image node_id 1 for calling a global function with example usage: append_scrapbook_commands(input_nb_path, output_nb_path, scrap_specs) without return types