code: def parse_value(  # noqa: C901
      src: str, pos: Pos, parse_float: ParseFloat
  ) -> tuple[Pos, Any]:
      try:
          char: str | None = src[pos]
      except IndexError:
          char = None
  
      # IMPORTANT: order conditions based on speed of checking and likelihood
  
      # Basic strings
      if char == '"':
          if src.startswith('"""', pos):
              return parse_multiline_str(src, pos, literal=False)
          return parse_one_line_basic_str(src, pos)
  
      # Literal strings
      if char == "'":
          if src.startswith("'''", pos):
              return parse_multiline_str(src, pos, literal=True)
          return parse_literal_str(src, pos)
  
      # Booleans
      if char == "t":
          if src.startswith("true", pos):
              return pos + 4, True
      if char == "f":
          if src.startswith("false", pos):
              return pos + 5, False
  
      # Arrays
      if char == "[":
          return parse_array(src, pos, parse_float)
  
      # Inline tables
      if char == "{":
          return parse_inline_table(src, pos, parse_float)
  
      # Dates and times
      datetime_match = RE_DATETIME.match(src, pos)
      if datetime_match:
          try:
              datetime_obj = match_to_datetime(datetime_match)
          except ValueError as e:
              raise suffixed_err(
                  src, pos, "Invalid date or datetime"
              ) from e
          return datetime_match.end(), datetime_obj
      localtime_match = RE_LOCALTIME.match(src, pos)
      if localtime_match:
          return localtime_match.end(), match_to_localtime(
              localtime_match
          )
  
      # Integers and "normal" floats.
      # The regex will greedily match any type starting with a decimal
      # char, so needs to be located after handling of dates and times.
      number_match = RE_NUMBER.match(src, pos)
      if number_match:
          return number_match.end(), match_to_number(
              number_match, parse_float
          )
  
      # Special floats
      first_three = src[pos : pos + 3]
      if first_three in {"inf", "nan"}:
          return pos + 3, parse_float(first_three)
      first_four = src[pos : pos + 4]
      if first_four in {"-inf", "+inf", "-nan", "+nan"}:
          return pos + 4, parse_float(first_four)
  
      raise suffixed_err(src, pos, "Invalid value")
  
imports: from __future__ import annotations
  from collections.abc import Iterable
  import string
  from types import MappingProxyType
  from typing import Any, BinaryIO, NamedTuple
  from ._re import RE_DATETIME, RE_LOCALTIME, RE_NUMBER, match_to_datetime, match_to_localtime, match_to_number
  from ._types import Key, ParseFloat, Pos
label_desc: Use image node_id 22 for calling a global function with example usage: parse_value(src, pos, parse_float) and returns: parse_one_line_basic_str, parse_literal_str, parse_array, parse_inline_table, datetime_match,  datetime_obj, localtime_match,  match_to_localtime, number_match,  match_to_number, unknown,  parse_float, unknown,  parse_float, parse_multiline_str, parse_multiline_str, unknown,  True, unknown,  False