def METHOD_NAME(self, raw_bill_id):
    expected_prefixes = {"SJR", "HB", "HR", "SB", "HJR", "SR"}
    bill_id_match = self.bill_id_re.search(raw_bill_id)
    if bill_id_match:
        bill_id_full_list = [x for x in bill_id_match.groups() if x]
        prefix = "".join(x[0] for x in bill_id_full_list[:-1])
        if prefix not in expected_prefixes:
            raise UnknownBillIdPrefixError(prefix)
        bill_id = f"{prefix} {bill_id_full_list[-1]}"
        return bill_id
    else:
        raise UnknownBillIdFormatError(raw_bill_id)