code: def string_to_bool(v):
      if isinstance(v, bool):
          return v
      if v.lower() in ("yes", "true", "t", "y", "1"):
          return True
      elif v.lower() in ("no", "false", "f", "n", "0"):
          return False
      else:
          raise ArgumentTypeError(
              f"Truthy value expected: got {v} but expected one of yes/no, true/false, t/f, y/n, 1/0 (case insensitive)."
          )
  
imports: import dataclasses
  import json
  import sys
  import types
  from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, ArgumentTypeError
  from copy import copy
  from enum import Enum
  from inspect import isclass
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterable, List, Literal, NewType, Optional, Tuple, Union, get_type_hints
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: string_to_bool(v) and returns: v, True, False