@classmethod
    def get_build(cls, version, build_number=None, latest=False):

        if latest:
            startkey = [version]
        else:
            build_number = int(build_number)
            startkey = [version, build_number]

        self = cls.view('builds/all',
            startkey=startkey + [{}],
            endkey=startkey,
            descending=True,
            limit=1,
            include_docs=True,
            reduce=False,
        ).one()

        if not self:
            raise KeyError("Can't find build {label}. For instructions on how to add it, see https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/builds/README.md".format(label=BuildSpec(
                version=version,
                build_number=build_number,
                latest=latest
            )))
        return self
Parses a string, subbing color codes as needed.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/builds/models.py/CommCareBuild.get_build--crossover with--dataset/ETHPy150Open evennia/evennia/evennia/utils/ansi.py/parse_ansi