code: def _make_image_labels(tmp_dir):
      labels = OpenLABELLabels()
      labels.update_metadata(
          {
              "annotation_id": 51,
              "input_uuid": "0",
              "project": "FiftyOne Test",
              "schema_version": "1.0.0",
              "uri": "https://annotation.provider",
              "uuid": "5151",
          }
      )
      labels.add_stream(
          "camera1",
          {
              "description": "image camera",
              "stream_properties": {"height": 480, "width": 640},
              "type": "camera",
          },
      )
  
      kp_obj_data = OpenLABELObjectData(
          "2d_point", [10, 20], "point2d", as_list=False
      )
      kp_obj = OpenLABELObject("keypoints1", "Keypoints")
      kp_obj.add_object_data(kp_obj_data)
      labels.add_object(kp_obj)
  
      pose_obj_data_2 = OpenLABELObjectData(
          "pose_point2", [20, 30], "point2d", as_list=False
      )
      pose_obj_data_2.add_attribute("skeleton_key", "point2")
      pose_obj_data_2.add_attribute("str_attr", "test")
      pose_obj_data_2.add_attribute("int_attr", 51)
      pose_obj_data_2.add_attribute("float_attr", 51.51)
      pose_obj_data_2.add_attribute("bool_attr", True)
      pose_obj_data_1 = OpenLABELObjectData(
          "pose_point1", [10, 20], "point2d", as_list=False
      )
      pose_obj_data_1.add_attribute("skeleton_key", "point1")
      pose_obj_data_1.add_attribute("str_attr", "test")
      pose_obj_data_1.add_attribute("int_attr", 51)
      pose_obj_data_1.add_attribute("float_attr", 51.51)
      pose_obj_data_1.add_attribute("bool_attr", True)
      pose_obj_datas = [pose_obj_data_2, pose_obj_data_1]
      pose_obj_data = _merge_object_datas(pose_obj_datas)
      pose_obj = OpenLABELObject("pose1", "Keypoints")
      pose_obj.add_object_data(pose_obj_data)
      labels.add_object(pose_obj)
  
      poly_obj_data = OpenLABELObjectData(
          "poly2d-0",
          [100, 200, 200, 200, 200, 100, 100, 100],
          "poly2d",
      )
      poly_obj_data.add_attributes(
          [
              ("closed", True),
              ("mode", "MODE_POLY2D_ABOSLUTE"),
          ]
      )
      poly_obj_data.add_attributes(
          [
              ("is_hole", False),
              ("polygon_id", "0"),
              ("stream", "camera1"),
          ],
          as_property=True,
      )
      poly_obj = OpenLABELObject(
          "polyname",
          "objectlabel1",
          frame_interval=(0, 0),
      )
      poly_obj.add_object_data(poly_obj_data, is_frame=True)
      labels.add_object(poly_obj)
  
      line_obj_data = OpenLABELObjectData(
          "poly2d-1",
          [100, 200, 200, 200, 200, 100],
          "poly2d",
      )
      line_obj_data.add_attributes(
          [
              ("closed", False),
              ("mode", "MODE_POLY2D_ABOSLUTE"),
          ]
      )
      line_obj_data.add_attributes(
          [
              ("stream", "camera1"),
          ],
          as_property=True,
      )
      line_obj = OpenLABELObject(
          "polyname2",
          "objectlabel1",
          frame_interval=(0, 0),
      )
      line_obj.add_object_data(line_obj_data, is_frame=True)
      labels.add_object(line_obj)
  
      bbox_obj_data = OpenLABELObjectData(
          "shape", [436.0, 303.5, 52, 47], "bbox"
      )
      bbox_obj = OpenLABELObject("car1", "Car")
      bbox_obj.add_object_data(bbox_obj_data)
      labels.add_object(bbox_obj)
  
      labels.add_stream(
          "camera1",
          {
              "description": "",
              "stream_properties": {"height": 480, "width": 640},
              "type": "camera",
          },
      )
  
      labels_path = os.path.join(tmp_dir, "openlabel_test.json")
      labels.write_labels(labels_path)
      return labels_path
  
imports: from collections import defaultdict
  import os
  import eta.core.serial
  import fiftyone.core.odm.dataset
label_desc: Use image node_id 3 for calling a global function with example usage: _make_image_labels(tmp_dir) and returns: labels_path