code: def test_load_pretrained_params(tmpdir_factory):
      model = Sequential(
          [
              layers.Dense(8, activation="relu", input_shape=(4,)),
              layers.Dense(4),
          ]
      )
      # Retrieve this URL
      url = "https://doctr-static.mindee.com/models?id=v0.1-models/tmp_checkpoint-4a98e492.zip&src=0"
      # Temp cache dir
      cache_dir = tmpdir_factory.mktemp("cache")
      # Pass an incorrect hash
      with pytest.raises(ValueError):
          load_pretrained_params(
              model,
              url,
              "mywronghash",
              cache_dir=str(cache_dir),
              internal_name="",
          )
      # Let tit resolve the hash from the file name
      load_pretrained_params(
          model, url, cache_dir=str(cache_dir), internal_name=""
      )
      # Check that the file was downloaded & the archive extracted
      assert os.path.exists(
          cache_dir.join("models").join("tmp_checkpoint-4a98e492")
      )
      # Check that archive was deleted
      assert os.path.exists(
          cache_dir.join("models").join("tmp_checkpoint-4a98e492.zip")
      )
  
file_path: doctr/tests/tensorflow/test_models_utils_tf.py
imports: import os
  import pytest
  import tensorflow
  from tensorflow.keras import Sequential, layers
  from tensorflow.keras.applications import ResNet50
  from doctr.models.utils import IntermediateLayerGetter, _bf16_to_float32, _copy_tensor, conv_sequence, load_pretrained_params
label_desc: Use image node_id 3 for calling a global function with example usage: test_load_pretrained_params(tmpdir_factory) without return types