docstr: PTS values increment by the inverse of sample rate
docstr_tok: ["PTS","values","increment","by","the","inverse","of","sample","rate"]
code: def test_audio_pts_increment(self):
      """PTS values increment by the inverse of sample rate"""
  
      ext = "wav"
      filename = f"test.{ext}"
      sample_rate = 8000
      num_channels = 2
  
      # Write data
      dst = self.get_temp_path(filename)
      writer = torchaudio.io.StreamWriter(dst=dst, format=ext)
      writer.add_audio_stream(
          sample_rate=sample_rate, num_channels=num_channels
      )
  
      audio = get_sinusoid(
          sample_rate=sample_rate,
          n_channels=num_channels,
          channels_first=False,
      )
      num_frames = audio.size(0)
      with writer.open():
          writer.write_audio_chunk(0, audio)
  
      reader = torchaudio.io.StreamReader(
          src=self.get_temp_path(filename)
      )
      frames_per_chunk = sample_rate // 4
      reader.add_audio_stream(frames_per_chunk, -1)
  
      chunks = [chunk for (chunk,) in reader.stream()]
      expected = num_frames // (frames_per_chunk)
      assert (
          len(chunks) == expected
      ), f"Expected {expected} elements. Found {len(chunks)}"
  
      num_samples = 0
      for chunk in chunks:
          expected = num_samples / sample_rate
          num_samples += chunk.size(0)
          print(chunk.pts, expected)
          assert abs(chunk.pts - expected) < 1e-10
  
imports: import io
  import math
  import torch
  import torchaudio
  from parameterized import parameterized, parameterized_class
  from torchaudio.io import CodecConfig, StreamReader, StreamWriter
  from torchaudio_unittest.common_utils import get_asset_path, get_sinusoid, nested_params, rgb_to_yuv_ccir, skipIfNoFFmpeg, skipIfNoModule, TempDirMixin, TorchaudioTestCase
  from .common import lt42
label_desc: Use image node_id 10 for calling the StreamWriterCorrectnessTest obj's underlying member method code with example usage: obj.test_audio_pts_increment() without return types