code: def test_create_export_model_card(session, caplog):
      session.sagemaker_client.create_model_card_export_job.side_effect = [
          CREATE_EXPORT_MODEL_CARD_EXAMPLE,
          CREATE_EXPORT_MODEL_CARD_EXAMPLE,
      ]
      session.sagemaker_client.describe_model_card_export_job.side_effect = [
          DESCRIBE_MODEL_CARD_EXPORT_JOB_IN_PROGRESS_EXAMPLE,
          DESCRIBE_MODEL_CARD_EXPORT_JOB_COMPLETED_EXAMPLE,
          DESCRIBE_MODEL_CARD_EXPORT_JOB_FAILED_EXAMPLE,
      ]
  
      job = ModelCardExportJob(
          model_card_name=MODEL_CARD_NAME,
          model_card_version=MODEL_CARD_VERSION,
          export_job_name=EXPORT_JOB_NAME,
          s3_output_path=S3_URL,
          sagemaker_session=session,
      )
      pdf_s3_url = job.create()
      assert (
          pdf_s3_url
          == DESCRIBE_MODEL_CARD_EXPORT_JOB_COMPLETED_EXAMPLE[
              "ExportArtifacts"
          ]["S3ExportArtifacts"]
      )
  
      job = ModelCardExportJob(
          model_card_name=MODEL_CARD_NAME,
          model_card_version=MODEL_CARD_VERSION,
          export_job_name=EXPORT_JOB_NAME,
          s3_output_path=S3_URL,
          sagemaker_session=session,
      )
      job.create()
      assert "Failed to export model card" in caplog.text
  
imports: from __future__ import absolute_import
  import io
  import os
  import json
  import datetime
  import re
  import logging
  import pytest
  from mock import patch, Mock
  from botocore.exceptions import ClientError
  import botocore.response
  from sagemaker.model_card import schema_constraints
  from sagemaker.model_card import Environment, ModelOverview, IntendedUses, BusinessDetails, ObjectiveFunction, TrainingMetric, HyperParameter, Metric, TrainingDetails, MetricGroup, EvaluationJob, AdditionalInformation, ModelCard, Function, TrainingJobDetails, ModelPackage
  from sagemaker.model_card.model_card import ModelCardExportJob, ModelPackageCreator, SourceAlgorithm, Container, InferenceSpecification
  from sagemaker.model_card.helpers import _MaxSizeArray, _IsList, _OneOf, _IsModelCardObject, _JSONEncoder, _hash_content_str, _DefaultToRequestDict, _SkipEncodingDecoding
  from sagemaker.model_card.evaluation_metric_parsers import EvaluationMetricTypeEnum, EVALUATION_METRIC_PARSERS
label_desc: Use image node_id 44 for calling a global function with example usage: test_create_export_model_card(session, caplog) without return types