code: def test_package_for_edge_with_sagemaker_config_injection(
      sagemaker_session,
  ):
      sagemaker_session.sagemaker_config = (
          SAGEMAKER_CONFIG_EDGE_PACKAGING_JOB
      )
      sagemaker_session.wait_for_edge_packaging_job.return_value = {
          "ModelArtifact": "TestArtifact"
      }
      sagemaker_session.expand_role.return_value = (
          SAGEMAKER_CONFIG_EDGE_PACKAGING_JOB["SageMaker"][
              "EdgePackagingJob"
          ]["RoleArn"]
      )
      model = Model(
          MODEL_DATA,
          MODEL_IMAGE,
          name=MODEL_NAME,
          sagemaker_session=sagemaker_session,
      )
      model._compilation_job_name = "compiledModel"
      model.package_for_edge(
          output_path="",
          model_name=MODEL_NAME,
          model_version=MODEL_VERSION,
      )
      sagemaker_session.expand_role.assert_called_with(
          SAGEMAKER_CONFIG_EDGE_PACKAGING_JOB["SageMaker"][
              "EdgePackagingJob"
          ]["RoleArn"]
      )
      sagemaker_session.package_model_for_edge.assert_called_with(
          compilation_job_name="compiledModel",
          job_name="packagingel",
          model_name=MODEL_NAME,
          model_version=MODEL_VERSION,
          output_model_config={
              "S3OutputLocation": "",
              "KmsKeyId": "configKmsKeyId",
          },
          resource_key="kmskeyid1",
          role=SAGEMAKER_CONFIG_EDGE_PACKAGING_JOB["SageMaker"][
              "EdgePackagingJob"
          ]["RoleArn"],
          tags=None,
      )
  
imports: from __future__ import absolute_import
  import random
  from unittest.mock import MagicMock
  import pytest
  from mock import Mock, patch
  import sagemaker
  from sagemaker.async_inference import AsyncInferenceConfig
  from sagemaker.model import FrameworkModel, Model
  from sagemaker.huggingface.model import HuggingFaceModel
  from sagemaker.jumpstart.constants import JUMPSTART_GATED_AND_PUBLIC_BUCKET_NAME_SET, JUMPSTART_RESOURCE_BASE_NAME
  from sagemaker.jumpstart.enums import JumpStartTag
  from sagemaker.mxnet.model import MXNetModel
  from sagemaker.pytorch.model import PyTorchModel
  from sagemaker.session_settings import SessionSettings
  from sagemaker.sklearn.model import SKLearnModel
  from sagemaker.tensorflow.model import TensorFlowModel
  from sagemaker.xgboost.model import XGBoostModel
  from sagemaker.enums import EndpointType
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
  from sagemaker.workflow.properties import Properties
  from tests.unit import _test_default_bucket_and_prefix_combinations, DEFAULT_S3_BUCKET_NAME, DEFAULT_S3_OBJECT_KEY_PREFIX_NAME, SAGEMAKER_CONFIG_EDGE_PACKAGING_JOB
label_desc: Use image node_id 44 for calling a global function with example usage: test_package_for_edge_with_sagemaker_config_injection(sagemaker_session) without return types