code: def test_lytro_raw_f0_reading(test_images):
      """Test reading of lytro .raw file"""
      # Get test images
      raw_file = test_images / RAW_F0_FILENAME
      raw_meta_file = test_images / RAW_F0_META_FILENAME
  
      # Read image and metadata file
      img = iio.imread(raw_file, format="lytro-f01-raw")
      meta_gt = json.load(open(raw_meta_file))
  
      # Test image shape and some pixel values
      # Pixel values are extracted from the Matlab reference implementation
      assert img.shape == (3280, 3280)
      assert round(img[16, 7], 15) == 0.044688644688645
      assert round(img[803, 74], 15) == 0.064713064713065
      assert round(img[599, 321], 15) == 0.059340659340659
      assert round(img[1630, 665], 15) == 0.198046398046398
      assert round(img[940, 2030], 15) == 0.130647130647131
      assert round(img[3164, 2031], 15) == 0.129914529914530
      assert round(img[3235, 3250], 15) == 0.136019536019536
      assert round(img[2954, 889], 15) == 0.159706959706960
      assert round(img[1546, 1243], 15) == 0.227350427350427
  
      # Test extracted metadata against extracted metadata from .txt file
      assert img._meta == meta_gt
  
      # Read metadata only
      img = iio.imread(raw_file, format="lytro-f01-raw", meta_only=True)
      assert np.array_equal(img, [])
      assert img._meta == meta_gt
  
      # Test fail
      test_reader = iio.read(raw_file, "lytro-f01-raw")
      with pytest.raises(IndexError):
          test_reader.get_data(-1)
  
      with pytest.raises(IndexError):
          test_reader.get_data(3)
  
file_path: imageio/tests/test_lytro.py
imports: from __future__ import division
  import numpy
  import json
  import pytest
  import imageio.v2
  from imageio.core import Request
  from conftest import deprecated_test
label_desc: Use image node_id 8 for calling a global function with example usage: test_lytro_raw_f0_reading(test_images) without return types