code: def _make_multilabel_dataset(img, images_dir):
      image_path = os.path.join(images_dir, "image.jpg")
      foui.write(img, image_path)
  
      sample = fo.Sample.from_dict(
          {
              "filepath": image_path,
              "tags": [],
              "metadata": {
                  "_cls": "ImageMetadata",
                  "size_bytes": 53219,
                  "mime_type": "image/jpeg",
                  "width": 1280,
                  "height": 720,
                  "num_channels": 3,
              },
              "gt_weather": {
                  "_cls": "Classification",
                  "label": "overcast",
              },
              "gt_scene": {
                  "_cls": "Classification",
                  "label": "city street",
              },
              "gt_timeofday": {
                  "_cls": "Classification",
                  "label": "daytime",
              },
              "gt_objs": {
                  "_cls": "Detections",
                  "detections": [
                      {
                          "_cls": "Detection",
                          "label": "traffic sign",
                          "bounding_box": [
                              0.7817958921875,
                              0.39165613194444443,
                              0.031193851562499986,
                              0.06238770138888894,
                          ],
                          "attributes": {
                              "occluded": {
                                  "_cls": "BooleanAttribute",
                                  "value": False,
                              },
                              "truncated": {
                                  "_cls": "BooleanAttribute",
                                  "value": False,
                              },
                              "trafficLightColor": {
                                  "_cls": "CategoricalAttribute",
                                  "value": "none",
                              },
                          },
                      }
                  ],
              },
              "uniqueness": 0.5432120379367298,
          }
      )
  
      dataset = fo.Dataset()
      dataset.add_sample(sample)
      return dataset
  
imports: import random
  import os
  import numpy
  import pytest
  import eta.core.utils
  import fiftyone
  import fiftyone.utils.image
  import fiftyone.brain
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 8 for calling a global function with example usage: _make_multilabel_dataset(img, images_dir) and returns: dataset