code: def test_dvc_pyramid_flow_estimator(shape):
      # checks output shapes of training mode for pyramidal flow
      rng = np.random.default_rng(12345)
      image1 = gen_random_image(shape, rng)
      image2 = gen_random_image(shape, rng)
  
      # test basic forward runs without exception
      layer = DVCPyramidFlowEstimator()
      flow, outputs = layer.calculate_flow_with_image_pairs(
          image1, image2
      )
  
      output_shapes = [(shape[0], 3, shape[2], shape[3])]
      for _ in range(1, len(layer.model_levels)):
          output_shapes.append(
              (
                  shape[0],
                  3,
                  output_shapes[-1][2] // 2,
                  output_shapes[-1][2] // 2,
              )
          )
  
      for output in outputs:
          output_shape = output_shapes.pop()
          assert tuple(output[0].shape) == output_shape
          assert tuple(output[1].shape) == output_shape
  
      assert tuple(flow.shape) == (
          image1.shape[0],
          2,
          image1.shape[2],
          image1.shape[3],
      )
  
file_path: NeuralCompression/tests/test_models.py
imports: import numpy
  import pytest
  import torch
  from utils import create_input
  import neuralcompression.functional
  from neuralcompression.models.deep_video_compression import DVC, DVCCompressionDecoder, DVCCompressionEncoder, DVCMotionCompensationModel, DVCPyramidFlowEstimator
label_desc: Use image node_id 6 for calling a global function with example usage: test_dvc_pyramid_flow_estimator(shape) without return types