class_docstr: The Stream_Reader continuously reads data from a selected sound source using PyAudio
  
  Arguments:
  
      device: int or None:    Select which audio stream to read .
      rate: float or None:    Sample rate to use. Defaults to something supported.
      updatesPerSecond: int:  How often to record new data.
docstr: given a device ID and a rate, return True/False if it's valid.
docstr_tok: ["given","a","device","ID","and","a","rate",",","return","True\/False","if","it","'s","valid","."]
code: def test_device(self, device, rate=None):
      """given a device ID and a rate, return True/False if it's valid."""
      try:
          self.info = self.pa.get_device_info_by_index(device)
          if not self.info["maxInputChannels"] > 0:
              return False
  
          if rate is None:
              rate = int(self.info["defaultSampleRate"])
  
          stream = self.pa.open(
              format=pyaudio.paInt16,
              channels=1,
              input_device_index=device,
              frames_per_buffer=self.update_window_n_frames,
              rate=rate,
              input=True,
          )
          stream.close()
          return True
      except Exception as e:
          # print(e)
          return False
  
file_path: rt-audio-fft/src/stream_reader_pyaudio.py
imports: import numpy
  import pyaudio
  import time, sys, math
  from collections import deque
  from src.utils import *
label_desc: Use image node_id 6 for calling the Stream_Reader obj's underlying member method code with example usage: obj.test_device(device, rate) and returns: True, False, False