code: def check_read_inputs(self, sampfrom, sampto, channels, physical,
                            smooth_frames, return_res):
          
  
          # Data Type Check
          if not hasattr(sampfrom, '__index__'):
              raise TypeError('sampfrom must be an integer')
          if not hasattr(sampto, '__index__'):
              raise TypeError('sampto must be an integer')
          if not isinstance(channels, list):
              raise TypeError('channels must be a list of integers')
  
          # Duration Ranges
          if sampfrom < 0:
              raise ValueError('sampfrom must be a non-negative integer')
          if sampfrom > self.sig_len:
              raise ValueError('sampfrom must be shorter than the signal length')
          if sampto < 0:
              raise ValueError('sampto must be a non-negative integer')
          if sampto > self.sig_len:
              raise ValueError('sampto must be shorter than the signal length')
          if sampto <= sampfrom:
              raise ValueError('sampto must be greater than sampfrom')
  
          # Channel Ranges
          if len(channels):
              if min(channels) < 0:
                  raise ValueError('Input channels must all be non-negative integers')
              if max(channels) > self.n_sig - 1:
                  raise ValueError('Input channels must all be lower than the total number of channels')
  
          if return_res not in [64, 32, 16, 8]:
              raise ValueError("return_res must be one of the following: 64, 32, 16, 8")
          if physical is True and return_res == 8:
              raise ValueError("return_res must be one of the following when physical is True: 64, 32, 16")
  
          # Cannot expand multiple samples/frame for multi-segment records
          if isinstance(self, MultiRecord):
              if smooth_frames is False:
                  raise ValueError('This package version cannot expand all samples when reading multi-segment records. Must enable frame smoothing.')
docs: Ensure that input read parameters (from rdsamp) are valid for
          the record