code: def _update_parameters(parameter_cell_source, new_parameters):
      """Replace parameter values in the cell source code."""
      modified_cell_source = parameter_cell_source
      for param, new_value in new_parameters.items():
          if (
              isinstance(new_value, str)
              and not (
                  new_value.startswith('"') and new_value.endswith('"')
              )
              and not (
                  new_value.startswith("'") and new_value.endswith("'")
              )
          ):
              # Check if the new value is a string and surround it with quotes if necessary
              new_value = f'"{new_value}"'
  
          # Define a regular expression pattern to match parameter assignments and ignore comments
          pattern = re.compile(
              rf"(\b{param})\s*=\s*([^#\n]+)(?:#.*$)?", re.MULTILINE
          )
          modified_cell_source = pattern.sub(
              rf"\1 = {new_value}", modified_cell_source
          )
  
      return modified_cell_source
  
file_path: recommenders/recommenders/utils/notebook_utils.py
imports: import os
  import re
  import nbformat
  from nbconvert.preprocessors import ExecutePreprocessor
  from IPython.display import display
label_desc: Use image node_id 3 for calling a global function with example usage: _update_parameters(parameter_cell_source, new_parameters) and returns: modified_cell_source