docs: def __quick_validate(r, check=('ResultSet', 'Result', 'totalRecords')):
      '''
      Quick validation of JSON result set returned by XNAT.
  
      :param r: Result set data in JSON format
      :type r: dict
      :param check: Fields to check
      :type check: tuple
      :returns: Result set is valid
      :rtype: bool
      '''
      if 'ResultSet' in check and 'ResultSet' not in r:
          raise ResultSetError('no ResultSet in server response')
      if 'Result' in check and 'Result' not in r['ResultSet']:
          raise ResultSetError('no Result in server response')
      if 'totalRecords' in check and 'totalRecords' not in r['ResultSet']:
          raise ResultSetError('no totalRecords in server response')
      return True