code: def test_max_size_list():
      assert _MaxSizeArray(5, int, [1, 2, 3])
  
      with pytest.raises(
          TypeError,
          match=re.escape(
              "Provided item type is <class 'str'> and Expected the item type is <class 'int'>"
          ),
      ):
          _MaxSizeArray(5, int, ["123"])
  
      with pytest.raises(
          ValueError,
          match=re.escape("Data size 6 exceed the maximum size of 5"),
      ):
          _MaxSizeArray(5, int, [1, 2, 3, 4, 5, 6])
  
      with pytest.raises(
          ValueError,
          match=re.escape("Max size has to be positive integer"),
      ):
          _MaxSizeArray(-1, int, [1, 2, 3, 4, 5, 6])
  
      with pytest.raises(
          ValueError, match=re.escape("Item type has to be a class")
      ):
          _MaxSizeArray(5, 1, [1, 2, 3, 4, 5, 6])
  
      with pytest.raises(
          TypeError,
          match=re.escape(
              "Provided item type is <class 'str'> and Expected the item type is <class 'int'>"
          ),
      ):
          array = _MaxSizeArray(5, int, [1])
          array.append("a")
  
      with pytest.raises(
          ValueError, match=re.escape("Exceed the maximum size of 5")
      ):
          array = _MaxSizeArray(5, int, [1, 2, 3, 4, 5])
          array.append(6)
  
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 16 for calling a global function with example usage: test_max_size_list() without return types