code: def test_push_to_hf_hub():
      model = models.classification.resnet18(pretrained=False)
      with pytest.raises(ValueError):
          # run_config and/or arch must be specified
          push_to_hf_hub(
              model, model_name="test", task="classification"
          )
      with pytest.raises(ValueError):
          # task must be one of classification, detection, recognition, obj_detection
          push_to_hf_hub(
              model,
              model_name="test",
              task="invalid_task",
              arch="mobilenet_v3_small",
          )
      with pytest.raises(ValueError):
          # arch not in available architectures for task
          push_to_hf_hub(
              model,
              model_name="test",
              task="detection",
              arch="crnn_mobilenet_v3_large",
          )
  
file_path: doctr/tests/tensorflow/test_models_factory.py
imports: import json
  import os
  import tempfile
  import pytest
  import tensorflow
  from doctr import models
  from doctr.models.factory import _save_model_and_config_for_hf_hub, from_hub, push_to_hf_hub
label_desc: Use image node_id 1 for calling a global function with example usage: test_push_to_hf_hub() without return types