code: def _convert_from_dict(obj, new_class):
      if isinstance(obj, new_class):
          return obj
      elif isinstance(obj, dict):
          api_client = ApiClient()
          return api_client._ApiClient__deserialize_model(
              obj, new_class
          )
      else:
          raise AirflowException(
              f"Expected dict or {new_class}, got {type(obj)}"
          )
  
file_path: airflow/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py
imports: from __future__ import annotations
  from kubernetes.client import ApiClient, models
  from airflow.exceptions import AirflowException
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_from_dict(obj, new_class) and returns: obj, api_client