code: def str2bool(v: str, fallback_true_label=None) -> bool:
      """Returns bool representation of the given value v.
  
      Check the value against global bool string lists.
      Fallback to using fallback_true_label as True if the value isn't in the global bool lists.
  
      args:
          v: Value to get the bool representation for.
          fallback_true_label: (str) label to use as 'True'.
      """
      v_str = str(v).lower()
      if v_str in BOOL_TRUE_STRS:
          return True
      if v_str in BOOL_FALSE_STRS:
          return False
      if fallback_true_label is None:
          raise ValueError(
              f"Cannot automatically map value '{v}' to a boolean and no `preprocessing.fallback_true_label` specified"
          )
      return v == fallback_true_label
  
imports: import logging
  import re
  import unicodedata
  from collections import Counter
  from dataclasses import dataclass
  from enum import Enum
  from typing import Dict, List, Optional, Set, Union
  import numpy
  from dateutil.parser import parse
  from ludwig.constants import PADDING_SYMBOL, START_SYMBOL, STOP_SYMBOL, UNKNOWN_SYMBOL
  from ludwig.data.dataframe.base import DataFrameEngine
  from ludwig.data.dataframe.pandas import PANDAS
  from ludwig.utils.fs_utils import open_file
  from ludwig.utils.math_utils import int_type
  from ludwig.utils.tokenizers import get_tokenizer_from_registry
  from ludwig.utils.types import Series
label_desc: Use image node_id 4 for calling a global function with example usage: str2bool(v, fallback_true_label) and returns: unknown, True, False