def METHOD_NAME(self, filename, id, raw, **kwargs):
    """Index filename using keyword arguments, check get_raw(id)==raw."""
    idx = SearchIO.index(filename, self.fmt, **kwargs)
    raw = raw.encode()
    # Anticipate cases where the raw string and/or file uses different
    # newline characters ~ we set everything to \n.
    new = idx.get_raw(id)
    self.assertIsInstance(new, bytes, f"Didn't get bytes from {self.fmt} get_raw")
    self.assertEqual(raw.replace(b"\r\n", b"\n"), new.replace(b"\r\n", b"\n"))
    idx.close()
    # Now again, but using SQLite backend
    if sqlite3:
        idx = SearchIO.index_db(":memory:", filename, self.fmt, **kwargs)
        new = idx.get_raw(id)
        self.assertIsInstance(
            new, bytes, f"Didn't get bytes from {self.fmt} get_raw"
        )
        self.assertEqual(raw.replace(b"\r\n", b"\n"), new.replace(b"\r\n", b"\n"))
        idx.close()
    if os.path.isfile(filename + ".bgz"):
        # Do the tests again with the BGZF compressed file
        print(f"[BONUS {filename}.bgz]")
        self.METHOD_NAME(filename + ".bgz", id, raw, **kwargs)