code: def test_compute_image_metadata(tmpdir):
      image_path = os.path.join(tmpdir, "image.png")
      dataset_dir = os.path.join(tmpdir, "images")
  
      _height = 720
      _width = 1280
  
      _write_image(image_path, size=(_height, _width))
      dataset = _make_dataset(image_path, dataset_dir, num_samples=100)
  
      sample = dataset.first()
      assert sample.metadata is None
  
      dataset.compute_metadata()
      assert sample.metadata.height == _height
      assert sample.metadata.width == _width
  
      dataset.compute_metadata(overwrite=True)
      assert sample.metadata.height == _height
      assert sample.metadata.width == _width
  
      dataset.clear_sample_field("metadata")
      assert sample.metadata is None
  
      dataset.compute_metadata(num_workers=1)
      assert sample.metadata.height == _height
      assert sample.metadata.width == _width
  
file_path: fiftyone/tests/intensive/utils_tests.py
imports: import os
  import numpy
  import pytest
  import eta.core.utils
  import eta.core.video
  import fiftyone
  import fiftyone.utils.image
  import fiftyone.utils.video
label_desc: Use image node_id 5 for calling a global function with example usage: test_compute_image_metadata(tmpdir) without return types