code: def trim_none_values(obj: dict):
      from packaging.version import Version
  
      from airflow.version import version
  
      if Version(version) < Version("2.7"):
          # before version 2.7, the behavior is not the same.
          # Empty dict and lists are removed from the given dict.
          return {
              key: val for key, val in obj.items() if val is not None
          }
      else:
          # once airflow 2.6 rolls out of compatibility support for provider packages,
          # we can replace usages of this method with the core one in our code,
          # and uncomment this warning for users who may use it.
          # warnings.warn("use airflow.utils.helpers.prune_dict() instead",
          #     AirflowProviderDeprecationWarning, stacklevel=2)
          return prune_dict(obj)
  
file_path: airflow/airflow/providers/amazon/aws/utils/__init__.py
imports: from __future__ import annotations
  import logging
  import re
  from datetime import datetime, timezone
  from enum import Enum
  from airflow.utils.helpers import prune_dict
  from airflow.version import version
label_desc: Use image node_id 1 for calling a global function with example usage: trim_none_values(obj) and returns: unknown, prune_dict