code: def test_mixed_precision(self):
      tf.keras.mixed_precision.set_global_policy("mixed_float16")
  
      # try/finally block to ensure subsequent tests run in float32
      try:
          (
              config,
              inputs_dict,
          ) = self.model_tester.prepare_config_and_inputs_for_common()
          for model_class in self.all_model_classes[:2]:
              class_inputs_dict = self._prepare_for_class(
                  inputs_dict, model_class
              )
              model = model_class(config)
              outputs = model(class_inputs_dict)
  
              self.assertIsNotNone(outputs)
      finally:
          tf.keras.mixed_precision.set_global_policy("float32")
  
imports: from __future__ import annotations
  import copy
  import os
  import tempfile
  from importlib import import_module
  from math import isnan
  from transformers import is_tf_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import _tf_gpu_memory_limit, require_tf, slow
  from ..test_modeling_tf_common import ids_tensor
label_desc: Use image node_id 6 for calling the TFCoreModelTesterMixin obj's underlying member method code with example usage: obj.test_mixed_precision() without return types