private static void writeEffect(@NotNull DataOutput out, EffectQuantum effect) throws IOException {
      if (effect == EffectQuantum.TopEffectQuantum) {
        DataInputOutputUtil.writeINT(out, -1);
      }
      else if (effect == EffectQuantum.ThisChangeQuantum) {
        DataInputOutputUtil.writeINT(out, -2);
      }
      else if (effect instanceof EffectQuantum.CallQuantum callQuantum) {
        DataInputOutputUtil.writeINT(out, -3);
        writeKey(out, callQuantum.key);
        out.writeBoolean(callQuantum.isStatic);
        DataInputOutputUtil.writeINT(out, callQuantum.data.length);
        for (DataValue dataValue : callQuantum.data) {
          writeDataValue(out, dataValue);
        }
      }
      else if (effect instanceof EffectQuantum.ReturnChangeQuantum returnChangeQuantum) {
        DataInputOutputUtil.writeINT(out, -4);
        writeKey(out, returnChangeQuantum.key);
      }
      else if (effect instanceof EffectQuantum.FieldReadQuantum fieldReadQuantum) {
        DataInputOutputUtil.writeINT(out, -5);
        writeKey(out, fieldReadQuantum.key);
      }
      else if (effect instanceof EffectQuantum.ParamChangeQuantum paramChangeQuantum) {
        DataInputOutputUtil.writeINT(out, paramChangeQuantum.n);
      }
    }
private static void writeEffect(@NotNull DataOutput out, EffectQuantum effect)