code: def test_AutoModel():
      # Full configs
      auto_model_config_1 = [
          "lp://detectron2/PubLayNet/faster_rcnn_R_50_FPN_3x/config",
          "lp://paddledetection/PubLayNet/ppyolov2_r50vd_dcn_365e/config",
          "lp://efficientdet/PubLayNet/tf_efficientdet_d0/config",
      ]
      for config in auto_model_config_1:
          model = AutoLayoutModel(config)
          image = cv2.imread(
              "tests/fixtures/model/test_model_image.jpg"
          )
          layout = model.detect(image)
  
      # Dataset name only
      # It will use the first available model
      auto_model_config_2 = [
          "lp://PubLayNet",
          "lp://MFD",
      ]
      for config in auto_model_config_1:
          model = AutoLayoutModel(config)
          model.DETECTOR_NAME == "efficientdet"
  
      # Automodel name that doesn't work
  
      # 1. No available backend for the model
      with pytest.raises(ValueError):
          model = AutoLayoutModel("lp://prima")
  
      # 2. Completely invalid name
      with pytest.raises(ValueError):
          model = AutoLayoutModel("lp://test")
  
file_path: layout-parser/tests/test_model.py
imports: import pytest
  import cv2
  from layoutparser import load_json
  from layoutparser.models import *
label_desc: Use image node_id 8 for calling a global function with example usage: test_AutoModel() without return types