code: def add_algo_version(
      existing_content,
      processors,
      scopes,
      full_version,
      py_versions,
      registries,
      repository,
      tag_prefix,
  ):
      """Update Algorithm image uri json file with new version information.
  
      Args:
          existing_content (dict): Existing algorithm image uri information read from
              "<algorithm>.json" file.
          processors (list): Supported processors (e.g. ["cpu", "gpu"])
          scopes (list): Framework image type, it could be "training", "inference
          full_version (str): Complete framework version (e.g. 1.0.0, 1.5.2)
          py_versions (list): Supported Python versions (e.g. ["py3", "py37"])
          registries (dict): Algorithm image's region to account mapping.
          repository (str): Algorithm's corresponding repository name.
          tag_prefix (str): Algorithm image's tag prefix.
      """
      for processor in processors:
          if processor not in existing_content["processors"]:
              existing_content["processors"].append(processor)
      for scope in scopes:
          if scope not in existing_content["scope"]:
              existing_content["scope"].append(scope)
  
      new_version = {
          "registries": registries,
          "repository": repository,
      }
      if py_versions:
          new_version["py_versions"] = py_versions
      if tag_prefix:
          new_version["tag_prefix"] = tag_prefix
      existing_content["versions"][full_version] = new_version
  
file_path: sagemaker-python-sdk/src/sagemaker/cli/framework_upgrade.py
imports: from __future__ import absolute_import
  import argparse
  import json
  import os
  from sagemaker.image_uris import config_for_framework
label_desc: Use image node_id 4 for calling a global function with example usage: add_algo_version(existing_content, processors, scopes, full_version, py_versions, registries, repository, tag_prefix) without return types