def _is_tst_or_xml_file(fname):
    """Returns True if the extension of fname is '.xml' or '.tst'."""
    assert isinstance(fname, str)
    ext = fname.split('.')[-1]
    return ext == 'tst' or ext == 'xml'
