code: def test_update_inference_tags_with_jumpstart_training_script_tags():
      random_tag_1 = {"Key": "tag-key-1", "Value": "tag-val-1"}
      random_tag_2 = {"Key": "tag-key-2", "Value": "tag-val-2"}
  
      js_tag = {
          "Key": JumpStartTag.TRAINING_SCRIPT_URI.value,
          "Value": "garbage-value",
      }
      js_tag_2 = {
          "Key": JumpStartTag.TRAINING_SCRIPT_URI.value,
          "Value": "garbage-value-2",
      }
  
      assert [
          random_tag_2
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[random_tag_2], training_tags=None
      )
  
      assert [
          random_tag_2
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[random_tag_2], training_tags=[]
      )
  
      assert [
          random_tag_2
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[random_tag_2], training_tags=[random_tag_1]
      )
  
      assert [
          random_tag_2,
          js_tag,
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[random_tag_2],
          training_tags=[random_tag_1, js_tag],
      )
  
      assert [
          random_tag_2,
          js_tag_2,
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[random_tag_2, js_tag_2],
          training_tags=[random_tag_1, js_tag],
      )
  
      assert (
          []
          == utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=[], training_tags=None
          )
      )
  
      assert (
          []
          == utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=[], training_tags=[]
          )
      )
  
      assert (
          []
          == utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=[], training_tags=[random_tag_1]
          )
      )
  
      assert [
          js_tag
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=[], training_tags=[random_tag_1, js_tag]
      )
  
      assert (
          None
          is utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=None, training_tags=None
          )
      )
  
      assert (
          None
          is utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=None, training_tags=[]
          )
      )
  
      assert (
          None
          is utils.update_inference_tags_with_jumpstart_training_tags(
              inference_tags=None, training_tags=[random_tag_1]
          )
      )
  
      assert [
          js_tag
      ] == utils.update_inference_tags_with_jumpstart_training_tags(
          inference_tags=None, training_tags=[random_tag_1, js_tag]
      )
  
imports: from __future__ import absolute_import
  import os
  from unittest import TestCase
  from mock.mock import Mock, patch
  import pytest
  import random
  from sagemaker.jumpstart import utils
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, ENV_VARIABLE_DISABLE_JUMPSTART_LOGGING, ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE, ENV_VARIABLE_JUMPSTART_GATED_CONTENT_BUCKET_OVERRIDE, JUMPSTART_DEFAULT_REGION_NAME, JUMPSTART_GATED_AND_PUBLIC_BUCKET_NAME_SET, JUMPSTART_LOGGER, JUMPSTART_REGION_NAME_SET, JUMPSTART_RESOURCE_BASE_NAME, JumpStartScriptScope
  from functools import partial
  from sagemaker.jumpstart.enums import JumpStartTag, MIMEType
  from sagemaker.jumpstart.exceptions import DeprecatedJumpStartModelError, VulnerableJumpStartModelError
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartVersionedModelId
  from tests.unit.sagemaker.jumpstart.utils import get_spec_from_base_spec
  from mock import MagicMock
label_desc: Use image node_id 16 for calling a global function with example usage: test_update_inference_tags_with_jumpstart_training_script_tags() without return types