def METHOD_NAME(sample, raw, mode):
    # Note that the payload size in our sample files is reduced,
    # so without anything the file is not readable.
    bad_info = file_info(sample, raw=raw)
    assert bad_info.readable is False
    assert list(bad_info.errors.keys()) == ['frame0']
    # But with the correct sample_rate, it works.
    base_info = file_info(sample)
    sample_rate = (base_info.frame_rate
                   * (8192 if base_info.mode == 'rawdump' else 8))
    info = file_info(sample, raw=raw, sample_rate=sample_rate)
    assert info.format == 'gsb'
    assert info.readable is True
    assert not info.errors
    module = importlib.import_module('.' + info.format, package='baseband')
    # Check we can indeed open a file with the extra arguments.
    with module.open(sample, mode='rs', **info.used_kwargs) as fh:
        info2 = fh.info
    assert info2() == info()