code: def test_optimized_int_type_for_typed_sequence(
      sequence, optimized_int_type, expected_dtype
  ):
      arr = pa.array(
          TypedSequence(sequence, optimized_int_type=optimized_int_type)
      )
      assert get_base_dtype(arr.type) == expected_dtype
  
imports: import copy
  import os
  import tempfile
  from unittest import TestCase
  from unittest.mock import patch
  import numpy
  import pyarrow
  import pyarrow.parquet
  import pytest
  from datasets.arrow_writer import ArrowWriter, OptimizedTypedSequence, ParquetWriter, TypedSequence
  from datasets.features import Array2D, ClassLabel, Features, Image, Value
  from datasets.features.features import Array2DExtensionType, cast_to_python_objects
  from datasets.keyhash import DuplicatedKeysError, InvalidKeyError
  from .utils import require_pil
label_desc: Use image node_id 13 for calling a global function with example usage: test_optimized_int_type_for_typed_sequence(sequence, optimized_int_type, expected_dtype) without return types