code: def preprocess(self, nb, resources):
      notebook_path = resources[PATH_RESOURCE_NAME]
      if not notebook_path.startswith(self.demos_path_prefix):
          print(
              f"WARNING: Notebook file path of {notebook_path} didn't start with {self.demos_path_prefix}, and may result in bad links to cloud runners."
          )
      self.remove_tagged_cells_from_notebook(nb)
      badge_cell = nbformat.v4.new_markdown_cell(
          self._badge_markdown(notebook_path)
      )
      self.tag_cell(badge_cell)
      # badges are created separately in docs by nbsphinx prolog / epilog
      hide_cell_from_docs(badge_cell)
      # the badges go after the first cell, unless the first cell is code
      if nb.cells[0].cell_type == "code":
          nb.cells.insert(0, badge_cell)
      else:
          nb.cells.insert(1, badge_cell)
      # find first code cell and insert a Colab import statement before it
      first_code_cell_id = next(
          index
          for index, cell in enumerate(nb.cells)
          if cell.cell_type == "code"
      )
      import_cell = nbformat.v4.new_code_cell(self.colab_import_code)
      self.tag_cell(import_cell)
      hide_cell_from_docs(import_cell)
      nb.cells.insert(first_code_cell_id, import_cell)
  
      nb.cells.append(
          badge_cell
      )  # add a badge to the bottom of notebook
      return nb, resources
  
imports: import argparse
  import copy
  import difflib
  import nbformat
  import re
  import shlex
  import subprocess
  import sys
  import os
  import tempfile
  from itertools import chain
  from traitlets import Set, Integer, Bool
  from traitlets.config import Config
  from pathlib import Path
  from nbconvert import NotebookExporter, HTMLExporter, writers, preprocessors
  from black import format_str, FileMode, InvalidInput
label_desc: Use image node_id 6 for calling the CloudRunnerPreprocessor obj's underlying member method code with example usage: obj.preprocess(nb, resources) and returns: nb,  resources