code: def label_configs():
      cases = [
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "classification",
                          "classes": [
                              "Adult content",
                              "Weapons",
                              "Violence",
                          ],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <Choices name="some_random_field" toName="image" choice="single-radio">
      <Choice value="Adult content"/>
      <Choice value="Weapons"/>
      <Choice value="Violence"/>
    </Choices>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "classifications",
                          "classes": ["Boeing", "Airbus"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <Choices name="some_random_field" toName="image" choice="multiple">
      <Choice value="Boeing"/>
      <Choice value="Airbus"/>
    </Choices>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "detections",
                          "classes": ["Airplane", "Car"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <RectangleLabels name="some_random_field" toName="image">
      <Label value="Airplane"/>
      <Label value="Car"/>
    </RectangleLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "instances",
                          "classes": ["Airplane", "Car"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <BrushLabels name="some_random_field" toName="image">
      <Label value="Airplane"/>
      <Label value="Car"/>
    </BrushLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "polylines",
                          "classes": ["Airplane", "Car"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <PolygonLabels name="some_random_field" toName="image">
      <Label value="Airplane"/>
      <Label value="Car"/>
    </PolygonLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "polygons",
                          "classes": ["Airplane", "Car"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <PolygonLabels name="some_random_field" toName="image">
      <Label value="Airplane"/>
      <Label value="Car"/>
    </PolygonLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "keypoints",
                          "classes": ["Engine", "Tail"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <KeyPointLabels name="some_random_field" toName="image">
      <Label value="Engine"/>
      <Label value="Tail"/>
    </KeyPointLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "segmentation",
                          "classes": ["Planet", "Moonwalker"],
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <BrushLabels name="some_random_field" toName="image">
      <Label value="Planet"/>
      <Label value="Moonwalker"/>
    </BrushLabels>
  </View>""",
          },
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "scalar",
                      }
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <Number name="some_random_field" toName="image"/>
  </View>""",
          },
          # Multiple fields example. Also check that can have multiple of the same type
          {
              "input": {
                  "media": "image",
                  "label_schema": {
                      "some_random_field": {
                          "type": "segmentation",
                          "classes": ["Planet", "Moonwalker"],
                      },
                      "some_random_field2": {
                          "type": "classification",
                          "classes": ["PlanetClass", "MoonwalkerClass"],
                      },
                      "some_random_field3": {
                          "type": "classification",
                          "classes": [
                              "PlanetClass2",
                              "MoonwalkerClass2",
                          ],
                      },
                      "some_random_field4": {
                          "type": "detection",
                          "classes": ["PlanetDet", "MoonwalkerDet"],
                      },
                  },
              },
              "output": """<View>
    <Image name="image" value="$image"/>
    <BrushLabels name="some_random_field" toName="image">
      <Label value="Planet"/>
      <Label value="Moonwalker"/>
    </BrushLabels>
    <Choices name="some_random_field2" toName="image" choice="single-radio">
      <Choice value="PlanetClass"/>
      <Choice value="MoonwalkerClass"/>
    </Choices>
    <Choices name="some_random_field3" toName="image" choice="single-radio">
      <Choice value="PlanetClass2"/>
      <Choice value="MoonwalkerClass2"/>
    </Choices>
    <RectangleLabels name="some_random_field4" toName="image">
      <Label value="PlanetDet"/>
      <Label value="MoonwalkerDet"/>
    </RectangleLabels>
  </View>""",
          },
      ]
      return cases
  
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 2 for calling a global function with example usage: label_configs() and returns: cases