See `8.11.2.2 Optional Content Membership Dictionaries` -> `VE` entry. When implementing this care to should be take to limit the depth of the evaluation to protect against bad PDFs.
ptnalCntent = prperte.get(cntentPrperte.name);
    } ele f (Dct(cntentPrperte)) {
      ptnalCntent = cntentPrperte;
    } ele {
      thrw new FrmatErrr("Optnal cntent prperte malfrmed.");
    }
    cnt ptnalCntentType = ptnalCntent.get("Type").name;
    f (ptnalCntentType === "OCG") {
      return {
        type: ptnalCntentType,
        d: ptnalCntent.bjId,
      };
    } ele f (ptnalCntentType === "OCMD") {
      cnt ptnalCntentGrup = ptnalCntent.get("OCG");
      f (
        Array.Array(ptnalCntentGrup) ||
        Dct(ptnalCntentGrup)
      ) {
        cnt grupId = [];
        f (Array.Array(ptnalCntentGrup)) {
          ptnalCntent.get("OCG").frEach(cg => {
            grupId.puh(cg.tStrng());
          });
        } ele {
          
          grupId.puh(ptnalCntentGrup.bjId);
        }
        let expren = null;
        f (ptnalCntent.get("VE")) {