code: def _get_output(model, confidence_thresh, store_logits):
      if isinstance(model, fi.ImageClassifier):
          prev_args = {}
          try:
              prev_args = dict(inspect.getmembers(model.output))
          except AttributeError:
              pass
  
          kwargs = {
              "multi_label": prev_args.get("multi_label", False),
              "store_logits": store_logits,
          }
  
          if "threshold" in prev_args:
              kwargs["threshold"] = prev_args["threshold"]
  
          if confidence_thresh is not None:
              kwargs["threshold"] = confidence_thresh
  
          return fc.FiftyOneLabelsOutput(**kwargs)
  
      if isinstance(model, fi.ObjectDetector):
          return fdo.FiftyOneDetectionLabelsOutput(
              threshold=confidence_thresh
          )
  
      if isinstance(model, fi.SemanticSegmentation):
          return fso.FiftyOneSegmentationLabelsOutput()
  
      raise ValueError(
          "Unsupported model type %s. Supported model types are %s"
          % (type(model), _SUPPORTED_MODELS)
      )
  
file_path: fiftyone/fiftyone/utils/flash.py
imports: import inspect
  import itertools
  import numpy
  import fiftyone.core.labels
  import fiftyone.core.utils
  import flash
  import flash.core.classification
  import flash.image
  import flash.image.detection.output
  import flash.image.segmentation.output
  import flash.video
label_desc: Use image node_id 5 for calling a global function with example usage: _get_output(model, confidence_thresh, store_logits) and returns: fc, fdo, fso