code: def test_optical_flow_dtype():
      # Generate synthetic data
      rng = np.random.default_rng(0)
      image0 = rng.normal(size=(256, 256))
      gt_flow, image1 = _sin_flow_gen(image0)
      # Estimate the flow at double precision
      flow_f64 = optical_flow_tvl1(
          image0, image1, attachment=5, dtype=np.float64
      )
  
      assert flow_f64.dtype == np.float64
  
      # Estimate the flow at single precision
      flow_f32 = optical_flow_tvl1(
          image0, image1, attachment=5, dtype=np.float32
      )
  
      assert flow_f32.dtype == np.float32
  
      # Assert that floating point precision does not affect the quality
      # of the estimated flow
  
      assert np.abs(flow_f64 - flow_f32).mean() < 1e-3
  
file_path: scikit-image/skimage/registration/tests/test_tvl1.py
imports: import numpy
  import pytest
  from skimage._shared.utils import _supported_float_type
  from skimage.registration import optical_flow_tvl1
  from skimage.transform import warp
label_desc: Use image node_id 6 for calling a global function with example usage: test_optical_flow_dtype() without return types