code: def test_dvc_motion_compensation(shape):
      # test the individual motion compensation block via run-without-exception
      rng = np.random.default_rng(123)
      image1 = gen_random_image(shape, rng)
      new_shape = shape[:]  # shallow copy
      new_shape[1] = 2
      flow = gen_random_image(new_shape, rng)
  
      # test basic forward runs without exception
      layer = DVCMotionCompensationModel()
      output = layer(
          ncF.dense_image_warp(image1, flow.permute(0, 2, 3, 1)),
          image1,
          flow,
      )
  
      assert list(output.shape) == shape
  
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 3 for calling a global function with example usage: test_dvc_motion_compensation(shape) without return types