code: def _infer_dbapi2_types(cursor, mod_info):
      desc = cursor.description
      result_set_types = [i[1] for i in desc]
      dbapi2_to_python = [  # a type code can match more than one, so ordered by
          # preference (loop short-circuits when it finds a match
          (mod_info["DATETIME"], _datetime.datetime),
          (mod_info["ROWID"], int),
          (mod_info["NUMBER"], float),
      ]
      ret_types = []
  
      # Ugly nested loop because the standard only guarantees that a type code
      # will compare equal to the module-defined types
      for i in result_set_types:
          type_found = False
          for j in dbapi2_to_python:
              if i is None or j[0] is None:
                  break
              elif i == j[0]:
                  ret_types.append(j[1])
                  type_found = True
                  break
          if not type_found:
              ret_types.append(str)
  
      return ret_types
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import urllib
  import re
  import itertools
  import uuid
  import datetime
  import sys
  from ._sframe_generation import generate_random_sframe
  from ._sframe_generation import generate_random_regression_sframe
  from ._sframe_generation import generate_random_classification_sframe
  from ._type_checks import _raise_error_if_not_of_type
  from ._type_checks import _is_non_string_iterable
  from ._progress_table_printer import ProgressTablePrinter
label_desc: Use image node_id 16 for calling a global function with example usage: _infer_dbapi2_types(cursor, mod_info) and returns: ret_types