code: def _generate_dummy_predictions(label_type, labels, n):
      if label_type == "classification":
          return [
              {"choices": [random.choice(labels)]} for _ in range(n)
          ]
      elif label_type == "detections":
          return [
              {
                  "x": random.randint(0, 50),
                  "y": random.randint(0, 50),
                  "width": random.randint(0, 50),
                  "height": random.randint(0, 50),
                  "rectanglelabels": [random.choice(labels)],
              }
              for _ in range(n)
          ]
      elif label_type == "polylines":
          return [
              {
                  "points": (np.random.random((4, 2)) * 100).tolist(),
                  "polygonlabels": [random.choice(labels)],
              }
              for _ in range(n)
          ]
      elif label_type == "keypoints":
  
          def generate_keypoint():
              label = random.choice(labels)
              return [
                  {
                      "type": "keypointlabels",
                      "from_name": "new_field-keypoints",
                      "to_name": "image",
                      "value": {
                          "x": random.randint(0, 50),
                          "y": random.randint(0, 50),
                          "width": 0.34,
                          "keypointlabels": [label],
                      },
                  }
                  for _ in range(5)
              ]
  
          return [generate_keypoint() for _ in range(n)]
      elif label_type == "segmentation":
          raise NotImplementedError()
      elif label_type == "scalar":
          return [{"number": random.randint(0, 100)} for _ in range(n)]
      else:
          raise ValueError("Unknown 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 16 for calling a global function with example usage: _generate_dummy_predictions(label_type, labels, n) and returns: unknown, unknown, unknown, unknown, unknown, unknown