code: def is_jumpstart_model_input(
      model_id: Optional[str], version: Optional[str]
  ) -> bool:
      """Determines if `model_id` and `version` input are for JumpStart.
  
      This method returns True if both arguments are not None, false if both arguments
      are None, and raises an exception if one argument is None but the other isn't.
  
      Args:
          model_id (str): Optional. Model ID of the JumpStart model.
          version (str): Optional. Version of the JumpStart model.
  
      Raises:
          ValueError: If only one of the two arguments is None.
      """
      if model_id is not None or version is not None:
          if model_id is None or version is None:
              raise ValueError(
                  "Must specify JumpStart `model_id` and `model_version` when getting specs for "
                  "JumpStart models."
              )
          return True
      return False
  
imports: from __future__ import absolute_import
  import logging
  import os
  from typing import Any, Dict, List, Optional, Union
  from urllib.parse import urlparse
  import boto3
  from packaging.version import Version
  import sagemaker
  from sagemaker.config.config_schema import MODEL_ENABLE_NETWORK_ISOLATION_PATH, MODEL_EXECUTION_ROLE_ARN_PATH, TRAINING_JOB_ENABLE_NETWORK_ISOLATION_PATH, TRAINING_JOB_INTER_CONTAINER_ENCRYPTION_PATH, TRAINING_JOB_ROLE_ARN_PATH
  from sagemaker.jumpstart import constants, enums
  from sagemaker.jumpstart import accessors
  from sagemaker.s3 import parse_s3_url
  from sagemaker.jumpstart.exceptions import DeprecatedJumpStartModelError, VulnerableJumpStartModelError, get_old_model_version_msg
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartModelSpecs, JumpStartVersionedModelId
  from sagemaker.session import Session
  from sagemaker.config import load_sagemaker_config
  from sagemaker.utils import resolve_value_from_config, TagsDict
  from sagemaker.workflow import is_pipeline_variable
label_desc: Use image node_id 7 for calling a global function with example usage: is_jumpstart_model_input(model_id, version) and returns: False, True