class_docstr: Test `FeaturesManager.determine_framework`
class_docstr_tok: ["Test","`","FeaturesManager.determine_framework","`"]
docstr: Ensure the that the provided framework is returned.
docstr_tok: ["Ensure","the","that","the","provided","framework","is","returned","."]
code: def test_framework_provided(self):
      """
      Ensure the that the provided framework is returned.
      """
      mock_framework = "mock_framework"
  
      # Framework provided - return whatever the user provides
      result = FeaturesManager.determine_framework(
          self.test_model, mock_framework
      )
      self.assertEqual(result, mock_framework)
  
      # Local checkpoint and framework provided - return provided framework
      # PyTorch checkpoint
      with TemporaryDirectory() as local_pt_ckpt:
          self._setup_pt_ckpt(local_pt_ckpt)
          result = FeaturesManager.determine_framework(
              local_pt_ckpt, mock_framework
          )
          self.assertEqual(result, mock_framework)
  
      # TensorFlow checkpoint
      with TemporaryDirectory() as local_tf_ckpt:
          self._setup_tf_ckpt(local_tf_ckpt)
          result = FeaturesManager.determine_framework(
              local_tf_ckpt, mock_framework
          )
          self.assertEqual(result, mock_framework)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/onnx/test_features.py
imports: from tempfile import TemporaryDirectory
  from unittest import TestCase
  from unittest.mock import MagicMock, patch
  from transformers import AutoModel, TFAutoModel
  from transformers.onnx import FeaturesManager
  from transformers.testing_utils import SMALL_MODEL_IDENTIFIER, require_tf, require_torch
label_desc: Use image node_id 4 for calling the DetermineFrameworkTest obj's underlying member method code with example usage: obj.test_framework_provided() without return types