docstr: Test that the metadata returned via pyav corresponds to the one returned
  by the new video decoder API
docstr_tok: ["Test","that","the","metadata","returned","via","pyav","corresponds","to","the","one","returned","by","the","new","video","decoder","API"]
code: def test_metadata(self, test_video, config, backend):
      """
      Test that the metadata returned via pyav corresponds to the one returned
      by the new video decoder API
      """
      torchvision.set_video_backend(backend)
      full_path = os.path.join(VIDEO_DIR, test_video)
      reader = VideoReader(full_path, "video")
      reader_md = reader.get_metadata()
      assert config.video_fps == approx(
          reader_md["video"]["fps"][0], abs=0.0001
      )
      assert config.duration == approx(
          reader_md["video"]["duration"][0], abs=0.5
      )
  
file_path: vision/test/test_videoapi.py
imports: import collections
  import os
  import urllib
  import pytest
  import torch
  import torchvision
  from pytest import approx
  from torchvision.datasets.utils import download_url
  from torchvision.io import _HAS_VIDEO_OPT, VideoReader
label_desc: Use image node_id 3 for calling the TestVideoApi obj's underlying member method code with example usage: obj.test_metadata(test_video, config, backend) without return types