code: def add_version(
      existing_content,
      short_version,
      full_version,
      scope,
      processors,
      py_versions,
      tag_prefix,
  ):
      """Read, update and write framework image uri.
  
      Read framework image uri information from json file to a dictionary, update it with new
      framework version information, then write the dictionary back to json file.
  
      Args:
          existing_content (dict): Existing framework/algorithm image uri information read from
              json file.
          short_version (str): Abbreviated framework version (e.g. 1.0, 1.5).
          full_version (str): Complete framework version (e.g. 1.0.0, 1.5.2).
          scope (str): Framework image type, it could be "training", "inference".
          processors (str): Supported processors (e.g. "cpu,gpu").
          py_versions (str): Supported Python versions (e.g. "py3,py37").
          tag_prefix (str): Algorithm image's tag prefix.
      """
      if py_versions:
          py_versions = py_versions.split(",")
      processors = processors.split(",")
      (
          latest_registries,
          latest_py_versions,
          latest_repository,
      ) = get_latest_values(existing_content, scope)
      if not py_versions:
          py_versions = latest_py_versions
  
      if scope in existing_content:
          add_dlc_framework_version(
              existing_content,
              short_version,
              full_version,
              scope,
              processors,
              py_versions,
              latest_registries,
              latest_repository,
          )
      else:
          scopes = scope.split(",")
          add_algo_version(
              existing_content,
              processors,
              scopes,
              full_version,
              py_versions,
              latest_registries,
              latest_repository,
              tag_prefix,
          )
  
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 6 for calling a global function with example usage: add_version(existing_content, short_version, full_version, scope, processors, py_versions, tag_prefix) without return types