def METHOD_NAME(self, status_code: int) -> str:
    try:
        status_phrase = http.HTTPStatus(status_code).phrase
    except ValueError:
        status_phrase = ""
    status_and_phrase = "%s %s" % (status_code, status_phrase)
    if self.use_colors:
        def default(code: int) -> str:
            return status_and_phrase  # pragma: no cover
        func = self.status_code_colours.get(status_code // 100, default)
        return func(status_and_phrase)
    return status_and_phrase