code: def _load_body_to_dict(body: str) -> dict:
      try:
          body_dict = yaml.safe_load(body)
      except yaml.YAMLError as e:
          raise AirflowException(
              f"Exception when loading resource definition: {e}\n"
          )
      return body_dict
  
imports: from __future__ import annotations
  import contextlib
  import json
  import tempfile
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Generator
  import aiofiles
  from asgiref.sync import sync_to_async
  from kubernetes import client, config, watch
  from kubernetes.config import ConfigException
  from kubernetes_asyncio import client, config
  from urllib3.exceptions import HTTPError
  from airflow.exceptions import AirflowException, AirflowNotFoundException
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection
  from airflow.providers.cncf.kubernetes.kube_client import _disable_verify_ssl, _enable_tcp_keepalive
  from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol
  from airflow.utils import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: _load_body_to_dict(body) and returns: body_dict