code: def _is_scalar_type(dtype, accept_str_col=False):
      import pyspark.sql.types as df_types
  
      if isinstance(dtype, df_types.FloatType):
          return True
      if isinstance(dtype, df_types.IntegerType):
          return True
      if isinstance(dtype, df_types.LongType):
          return True
      if isinstance(dtype, df_types.DoubleType):
          return True
      if isinstance(dtype, df_types.TimestampType):
          return True
      if isinstance(dtype, df_types.DecimalType):
          return True
      if accept_str_col and isinstance(dtype, df_types.StringType):
          return True
      return False
  
imports: import glob
  from bigdl.dllib.utils.file_utils import Sample
  import numpy
  from pyspark.ml.linalg import DenseVector, SparseVector, VectorUDT
  import sys
  import os
  import re
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 13 for calling a global function with example usage: _is_scalar_type(dtype, accept_str_col) and returns: False, True, True, True, True, True, True, True