diff --git a/podman/domain/pods_manager.py b/podman/domain/pods_manager.py
index f7b42a8a..2d27ba63 100644
--- a/podman/domain/pods_manager.py
+++ b/podman/domain/pods_manager.py
@@ -131,7 +131,9 @@ def remove(self, pod_id: Union[Pod, str], force: Optional[bool] = None) -> None:
         response = self.client.delete(f"/pods/{pod_id}", params={"force": force})
         response.raise_for_status()
 
-    def stats(self, **kwargs) -> builtin_list[dict[str, Any]] | [builtin_list[dict[str, Any]]]:
+    def stats(
+        self, **kwargs
+    ) -> Union[builtin_list[dict[str, Any]], [builtin_list[dict[str, Any]]]]:
         """Resource usage statistics for the containers in pods.
 
         Keyword Args: