  CONV_SHAPE = (3, 3, 256, 2048)
  CONV_ID = get_backend().upper()
  
  
  def layer_test(layer_cls, kwargs={}, input_shape=None, input_dtype=None,
                 input_data=None, expected_output=None,
                 expected_output_dtype=None, fixed_batch_size=False):
      """Test routine for a layer with a single input tensor
      and single output tensor.
      """
 
</s> remove             logger.trace("Loading video frame: '%s'", filename)  # type: ignore
 </s> add             logger.trace("Loading video frame: '%s'", filename)  # type:ignore[attr-defined] </s> remove     def _initialize(self, index=0):
 </s> add     def _initialize(self, index=0):  # noqa:C901 </s> remove         reader = imageio.get_reader(self._args.input_dir, "ffmpeg")
        for i, frame in enumerate(reader):
 </s> add         reader = imageio.get_reader(self._args.input_dir, "ffmpeg")  # type:ignore[arg-type]
        for i, frame in enumerate(cast(Iterator[np.ndarray], reader)): </s> remove         """ makes sure that the frames or faces folder exists
 </s> add         """ Ensure that the frames or faces folder exists and is valid. </s> remove             meta = dict(alignments=face.to_png_meta(),
                        source=dict(alignments_version=self._alignments.version,
                                    original_filename=output,
                                    face_index=idx,
                                    source_filename=filename,
                                    source_is_video=self._frames.is_video,
                                    source_frame_dims=image.shape[:2]))
 </s> add             meta: PNGHeaderDict = dict(
                alignments=face.to_png_meta(),
                source=dict(alignments_version=self._alignments.version,
                            original_filename=output,
                            face_index=idx,
                            source_filename=filename,
                            source_is_video=self._frames.is_video,
                            source_frame_dims=cast(Tuple[int, int], image.shape[:2])))
            assert face.aligned.face is not None
def layer_test(layer_cls, kwargs={}, input_shape=None, input_dtype=None,  # noqa:C901
  CONV_SHAPE = (3, 3, 256, 2048)
  CONV_ID = get_backend().upper()
  
  
def layer_test(layer_cls, kwargs={}, input_shape=None, input_dtype=None,  # noqa:C901
                 input_data=None, expected_output=None,
                 expected_output_dtype=None, fixed_batch_size=False):
      """Test routine for a layer with a single input tensor
      and single output tensor.
      """
keep keep keep keep replace keep keep keep keep keep
 tests:
  - unit test: tools.alignments.media
  - Add mypy test
  - Typing fixes 
tests/lib/model/layers_test.py