code: def test_recognition_model_densenet(image_input):
      classifier = CustomImageClassification()
      classifier.setModelTypeAsDenseNet121()
      classifier.setModelPath(
          os.path.join(
              test_folder,
              "data-models",
              "densenet121-idenprof-test_acc_0.82550_epoch-95.pt",
          )
      )
      classifier.setJsonPath(
          os.path.join(
              test_folder, "data-json", "idenprof_model_classes.json"
          )
      )
      classifier.loadModel()
      predictions, probabilities = classifier.classifyImage(
          image_input=image_input, result_count=5
      )
  
      assert isinstance(predictions, list)
      assert isinstance(probabilities, list)
      assert isinstance(predictions[0], str)
      assert isinstance(probabilities[0], float)
  
file_path: ImageAI/test/test_custom_classification.py
imports: import os, sys
  import cv2
  from PIL import Image
  import pytest
  from os.path import dirname
  from imageai.Classification.Custom import CustomImageClassification
label_desc: Use image node_id 4 for calling a global function with example usage: test_recognition_model_densenet(image_input) without return types