def METHOD_NAME(
    cls, revoc_reg_def: dict, public_def: bool
) -> "RevocationRegistry":
    """Initialize a revocation registry instance from a definition."""
    rev_reg = None
    reg_id = revoc_reg_def["id"]
    tails_location = revoc_reg_def["value"]["tailsLocation"]
    issuer_did_match = re.match(r"^.*?([^:]*):3:CL:.*", revoc_reg_def["credDefId"])
    issuer_did = issuer_did_match.group(1) if issuer_did_match else None
    init = {
        "cred_def_id": revoc_reg_def["credDefId"],
        "issuer_did": issuer_did,
        "reg_def_type": revoc_reg_def["revocDefType"],
        "max_creds": revoc_reg_def["value"]["maxCredNum"],
        "tag": revoc_reg_def["tag"],
        "tails_hash": revoc_reg_def["value"]["tailsHash"],
        "reg_def": revoc_reg_def,
    }
    if public_def:
        init["tails_public_uri"] = tails_location
        rev_reg = cls(reg_id, **init)  # ignores def ver, issuance type, public keys
        rev_reg.tails_local_path = rev_reg.get_receiving_tails_local_path()
    else:
        init["tails_local_path"] = tails_location
        rev_reg = cls(reg_id, **init)  # ignores def ver, issuance type, public keys
    return rev_reg