code: def _generate_dummy_labels(label_type, labels):
      if label_type == "classification":
          return fo.Classification(label=random.choice(labels))
      elif label_type == "detections":
          rand_box = lambda: (np.random.random(4) / 2).tolist()
          detections = [
              fo.Detection(
                  label=random.choice(labels), bounding_box=rand_box()
              ),
              fo.Detection(
                  label=random.choice(labels), bounding_box=rand_box()
              ),
          ]
          return fo.Detections(detections=detections)
      elif label_type == "polylines":
          rand_points = lambda n: [np.random.random((n, 2)).tolist()]
          polylines = [
              fo.Polyline(
                  label=random.choice(labels), points=rand_points(5)
              ),
              fo.Polyline(
                  label=random.choice(labels), points=rand_points(6)
              ),
          ]
          return fo.Polylines(polylines=polylines)
      elif label_type == "keypoints":
          keypoints = [
              fo.Keypoint(
                  label=random.choice(labels),
                  points=np.random.random((5, 2)).tolist(),
              ),
              fo.Keypoint(
                  label=random.choice(labels),
                  points=np.random.random((4, 2)).tolist(),
              ),
          ]
          return fo.Keypoints(keypoints=keypoints)
      elif label_type == "segmentation":
          raise NotImplementedError()
      elif label_type == "scalar":
          return fo.Regression(value=random.randint(0, 100))
      else:
          raise ValueError("Unknown label type: {}".format(label_type))
  
imports: import os
  import random
  import numpy
  import pytest
  import fiftyone
  import fiftyone.zoo
  import fiftyone.utils.labelstudio
  import fiftyone.core.labels
label_desc: Use image node_id 17 for calling a global function with example usage: _generate_dummy_labels(label_type, labels) and returns: fo, fo, fo, fo, fo