code: def test_convert_record_to_fo_sample(object_detection_record):
      # Test create new sample
      test_sample = convert_record_to_fo_sample(
          object_detection_record,
          "test",
          None,
          False,
          None,
          lambda x: x,
      )
      assert isinstance(test_sample, Sample)
      assert hasattr(test_sample, "test")
      assert len(test_sample["test"]) > 0
  
      # Test add to existing sample  and autosave
      sample = Sample(object_detection_record.common.filepath)
      test_sample = convert_record_to_fo_sample(
          object_detection_record,
          "test",
          sample,
          False,
          None,
          lambda x: x,
      )
      assert isinstance(test_sample, Sample)
      assert hasattr(test_sample, "test")
      assert len(test_sample["test"]) > 0
  
      # Test iv postprocess bbox
      test_tfms = [
          tfms.A.Adapter(
              [*tfms.A.resize_and_pad([1000, 1000]), tfms.A.Normalize()]
          )
      ]
      test_sample = convert_record_to_fo_sample(
          object_detection_record, "test", None, False, test_tfms, None
      )
  
      assert isinstance(test_sample, Sample)
      assert hasattr(test_sample, "test")
      assert len(test_sample["test"]) > 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 3 for calling a global function with example usage: test_convert_record_to_fo_sample(object_detection_record) without return types