code: def image_dl_estimator(framework, get_image_classifier_mx_instance):
      def _image_dl_estimator(functional=False, **kwargs):
          sess = None
          wildcard = False
          classifier = None
  
          if kwargs.get("wildcard") is not None:
              if kwargs.get("wildcard") is True:
                  wildcard = True
              del kwargs["wildcard"]
  
          if framework == "keras":
              if wildcard is False and functional is False:
                  if functional:
                      classifier = get_image_classifier_kr_functional(
                          **kwargs
                      )
                  else:
                      try:
                          classifier = get_image_classifier_kr(**kwargs)
                      except NotImplementedError:
                          raise ARTTestFixtureNotImplemented(
                              "This combination of loss function options is currently not supported.",
                              image_dl_estimator.__name__,
                              framework,
                          )
          if framework in [
              "tensorflow1",
              "tensorflow2",
              "tensorflow2v1",
          ]:
              if wildcard is False and functional is False:
                  classifier, sess = get_image_classifier_tf(
                      **kwargs, framework=framework
                  )
                  return classifier, sess
          if framework == "pytorch":
              if not wildcard:
                  if functional:
                      classifier = get_image_classifier_pt_functional(
                          **kwargs
                      )
                  else:
                      classifier = get_image_classifier_pt(**kwargs)
          if framework == "kerastf":
              if wildcard:
                  classifier = get_image_classifier_kr_tf_with_wildcard(
                      **kwargs
                  )
              else:
                  if functional:
                      classifier = (
                          get_image_classifier_kr_tf_functional(
                              **kwargs
                          )
                      )
                  else:
                      classifier = get_image_classifier_kr_tf(**kwargs)
  
          if framework == "mxnet":
              if wildcard is False and functional is False:
                  classifier = get_image_classifier_mx_instance(
                      **kwargs
                  )
  
          if framework == "huggingface":
              if not wildcard:
                  classifier = get_image_classifier_hf(**kwargs)
  
          if classifier is None:
              raise ARTTestFixtureNotImplemented(
                  "no test deep learning estimator available",
                  image_dl_estimator.__name__,
                  framework,
              )
  
          return classifier, sess
  
      return _image_dl_estimator
  
imports: import importlib
  import json
  import logging
  import os
  import shutil
  import tempfile
  from typing import Dict, List, TYPE_CHECKING, Union
  import warnings
  import numpy
  import pytest
  import requests
  from art.data_generators import KerasDataGenerator, MXDataGenerator, PyTorchDataGenerator, TensorFlowDataGenerator, TensorFlowV2DataGenerator
  from art.defences.preprocessor import FeatureSqueezing, JpegCompression, SpatialSmoothing
  from art.estimators.classification import KerasClassifier
  from tests.utils import ARTTestFixtureNotImplemented, get_attack_classifier_pt, get_image_classifier_kr, get_image_classifier_kr_functional, get_image_classifier_kr_tf, get_image_classifier_kr_tf_functional, get_image_classifier_kr_tf_with_wildcard, get_image_classifier_mxnet_custom_ini, get_image_classifier_pt, get_image_classifier_pt_functional, get_image_classifier_tf, get_image_classifier_hf, get_image_gan_tf_v2, get_image_generator_tf_v2, get_tabular_classifier_kr, get_tabular_classifier_pt, get_tabular_classifier_scikit_list, get_tabular_classifier_tf, load_dataset, master_seed
label_desc: Use image node_id 18 for calling a global function with example usage: image_dl_estimator(framework, get_image_classifier_mx_instance) and returns: _image_dl_estimator, classifier,  sess, classifier,  sess