code: def _maybe_list_to_array(str_list, dtype_as):
      if isinstance(dtype_as, (list, tuple)):
          return type(dtype_as)(str_list)
      elif isinstance(dtype_as, np.ndarray):
          return np.array(str_list)
      else:
          return str_list
  
file_path: texar/texar/tf/utils/dtypes.py
imports: import six
  import numpy
  import tensorflow
label_desc: Use image node_id 6 for calling a global function with example usage: _maybe_list_to_array(str_list, dtype_as) and returns: type, np, str_list