code: def _get_dtype(format_spec: str) -> Type:
      # We need to prepare data in the row for different formatting options.
      # If you have a number like 0.1234 in the DF and you want to format it like {number:.2f} it will fail if the
      # number is represented as a string in the DF. So we need to cast it to a float before formatting.
      if not format_spec:
          return str
      if "f" in format_spec:
          return float
      raise ValueError(
          f"Unsupported template format spec: {format_spec}"
      )
  
file_path: ludwig/ludwig/data/prompt.py
imports: import json
  import logging
  import os
  import string
  from typing import Any, Dict, List, Optional, Set, Tuple, Type, TYPE_CHECKING
  import pandas
  from ludwig.models.retrieval import df_checksum, get_retrieval_model, RetrievalModel
  from ludwig.utils.fs_utils import get_default_cache_location, makedirs, path_exists
  from ludwig.utils.types import DataFrame, Series
label_desc: Use image node_id 5 for calling a global function with example usage: _get_dtype(format_spec) and returns: str, float