code: def test_create_fo_dataset(
      object_detection_record, cleanup_fo_dataset
  ):
      # Create Prediction
      object_detection_record.original_img_size = [1000, 1000]
      object_detection_prediction = Prediction(
          object_detection_record, object_detection_record
      )
  
      # Test for record and with existing dataset
      dataset = Dataset("_iv_test")
      dataset = create_fo_dataset(
          [object_detection_prediction],
          dataset_name="_iv_test",
          exist_ok=True,
      )
  
      del (
          object_detection_record.original_img_size
      )  # Cleanup record, that has scope session
  
      assert isinstance(dataset, Dataset)
      assert len(list(dataset.iter_samples())) > 0
  
      # Test for prediction and create new dataset
      dataset = create_fo_dataset(
          [object_detection_record], "_iv_test_1"
      )
  
      assert isinstance(dataset, Dataset)
      assert len(list(dataset.iter_samples())) > 0
  
file_path: icevision/tests/data/test_convert_records_to_fo.py
imports: import imp
  from venv import create
  import pytest
  from PIL import Image
  from fiftyone import list_datasets, load_dataset, Detection, Sample, Dataset
  from icevision import tfms
  from icevision import data
  from icevision.data import Prediction
  from icevision.data.convert_records_to_fo import _convert_bbox_to_fo_bbox, record_to_fo_detections
  from icevision.data import convert_record_to_fo_sample, convert_prediction_to_fo_sample, create_fo_dataset
  from tests.conftest import object_detection_record
label_desc: Use image node_id 5 for calling a global function with example usage: test_create_fo_dataset(object_detection_record, cleanup_fo_dataset) without return types