code: def load(pipeline, fd):
      pipeline_dict = json.load(fd)
      cp_version = int(
          re.sub(r"\.|rc\d", "", cellprofiler_core.__version__)
      )
      if cp_version != pipeline_dict["date_revision"]:
          LOGGER.warning(
              f"Pipeline file is from a different version of CellProfiler. "
              f"Current:v{cp_version} File:v{pipeline_dict['date_revision']}."
              f" Will attempt to upgrade settings."
          )
      pipeline_modules = pipeline.modules(False)
      pipeline_modules.clear()
      for module in pipeline_dict["modules"]:
          module_name = module["attributes"]["module_name"]
          settings = [
              setting_dict for setting_dict in module["settings"]
          ]
          new_module = pipeline.instantiate_module(module_name)
          new_module.from_dict(settings, module["attributes"])
          pipeline_modules.append(new_module)
  
imports: import json
  import logging
  import os
  import re
  import cellprofiler_core
  from cellprofiler_core.constants.pipeline import IMAGE_PLANE_DESCRIPTOR_VERSION, H_PLANE_COUNT
label_desc: Use image node_id 2 for calling a global function with example usage: load(pipeline, fd) without return types