code: def is_classifier(model):
      """
      checks for classification and mutlilabel from model
      """
      is_classifier = False
      is_multilabel = False
  
      # get loss name
      loss = model.loss
      if callable(loss):
          if hasattr(loss, "__name__"):
              loss = loss.__name__
          elif hasattr(loss, "name"):
              loss = loss.name
          else:
              raise Exception("could not get loss name")
  
      # check for classification
      if loss in [
          "categorical_crossentropy",
          "sparse_categorical_crossentropy",
          "binary_crossentropy",
      ]:
          is_classifier = True
      else:
          mlist = metrics_from_model(model)
          if isinstance(mlist, (list, np.ndarray)) and any(
              ["accuracy" in m for m in mlist]
          ):
              is_classifier = True
          elif isinstance(mlist, (list, np.ndarray)) and any(
              ["auc" in m for m in mlist]
          ):
              is_classifier = True
  
      # check for multilabel
      if loss == "binary_crossentropy":
          if is_huggingface(model=model):
              is_multilabel = True
          else:
              last = model.layers[-1]
              output_shape = last.output_shape
              mult_output = (
                  True
                  if len(output_shape) == 2 and output_shape[1] > 1
                  else False
              )
              if (
                  (
                      hasattr(last, "activation")
                      and isinstance(
                          last.activation,
                          type(keras.activations.sigmoid),
                      )
                  )
                  or isinstance(last, type(keras.activations.sigmoid))
              ) and mult_output:
                  is_multilabel = True
      return (is_classifier, is_multilabel)
  
imports: from .imports import *
  from subprocess import Popen
label_desc: Use image node_id 5 for calling a global function with example usage: is_classifier(model) and returns: is_classifier,  is_multilabel