def setUp(self):
        """Record the global dtype policy before each test."""
        super().setUp()
        self._global_dtype_policy = dtype_policy()
Record the global dtype policy before each test.
keras/src/dtype_policies/dtype_policy_test.py