def METHOD_NAME(self, detect_version_args):
    import spack.compilers
    modulecmd = self.modulecmd
    compiler_name = detect_version_args.id.compiler_name
    compiler_cls = spack.compilers.class_for_compiler_name(compiler_name)
    output = modulecmd("avail", compiler_cls.PrgEnv_compiler)
    version_regex = r"({0})/([\d\.]+[\d]-?[\w]*)".format(compiler_cls.PrgEnv_compiler)
    matches = re.findall(version_regex, output)
    version = tuple(version for _, version in matches if "classic" not in version)
    compiler_id = detect_version_args.id
    value = detect_version_args._replace(id=compiler_id._replace(version=version))
    return value, None