code: def test_infer_list_type(self):
      self.assertEqual(
          infer_type_of_list(
              [
                  image.Image(
                      current_file_dir
                      + "/images/nested/sample_grey.png"
                  ),
                  image.Image(
                      current_file_dir + "/images/sample.jpg", "JPG"
                  ),
                  image.Image(current_file_dir + "/images/sample.png"),
              ]
          ),
          image.Image,
      )
      self.assertEqual(
          infer_type_of_list(
              [
                  dt.datetime(2010, 10, 10, 10, 10, 10),
                  dt.datetime(2000, 5, 7, 10, 4, 10),
                  dt.datetime(1845, 5, 7, 4, 4, 10),
              ]
          ),
          dt.datetime,
      )
      self.assertEqual(infer_type_of_list([0, 1, 2]), int)
      self.assertEqual(infer_type_of_list([0, 1, 2.0]), float)
      self.assertEqual(infer_type_of_list(["foo", "bar"]), str)
      self.assertEqual(
          infer_type_of_list(
              [array.array("d", [1, 2, 3]), array.array("d", [1, 2, 3])]
          ),
          array.array,
      )
      self.assertEqual(
          infer_type_of_list(
              [[], [1.0, 2.0, 3.0], array.array("d", [1, 2, 3])]
          ),
          array.array,
      )
      self.assertEqual(
          infer_type_of_list(
              [[], [1, 2, 3], array.array("d", [1, 2, 3])]
          ),
          array.array,
      )
      self.assertEqual(infer_type_of_list([{"a": 1}, {"b": 2}]), dict)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import numpy
  from numpy import nan
  import array
  import datetime
  from ..data_structures import image
  from ..None import SArray
  import os
  from .._cython.cy_flexible_type import _translate_through_flexible_type
  from .._cython.cy_flexible_type import _translate_through_flex_list
  from .._cython.cy_flexible_type import infer_type_of_list
  from .._cython.cy_flexible_type import _get_inferred_column_type, _all_convertable
  from .._cython.cy_flexible_type import _check_ft_pyobject_hint_path
  from .._cython.cy_flexible_type import pytype_from_type_name
  from .._cython.cy_flexible_type import GMT
  import datetime
  from itertools import product
  from copy import copy
  import pytest
  import sys
label_desc: Use image node_id 13 for calling the FlexibleTypeTest obj's underlying member method code with example usage: obj.test_infer_list_type() without return types