code: def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
      try:
          char: str | None = src[pos]
      except IndexError:
          char = None
      if char in BARE_KEY_CHARS:
          start_pos = pos
          pos = skip_chars(src, pos, BARE_KEY_CHARS)
          return pos, src[start_pos:pos]
      if char == "'":
          return parse_literal_str(src, pos)
      if char == '"':
          return parse_one_line_basic_str(src, pos)
      raise suffixed_err(
          src, pos, "Invalid initial character for a key part"
      )
  
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 12 for calling a global function with example usage: parse_key_part(src, pos) and returns: pos,  src, parse_literal_str, parse_one_line_basic_str