@NotNull
  public MemoryAgentActionResult<Pair<long[], ObjectReference[]>> estimateObjectSize(@NotNull EvaluationContextImpl evaluationContext,
                                                                                     @NotNull ObjectReference reference,
                                                                                     long timeoutInMillis) throws EvaluateException {
    Value result = callMethod(
      evaluationContext,
      ESTIMATE_OBJECT_SIZE,
      timeoutInMillis, reference
    );
    Pair<MemoryAgentActionResult.ErrorCode, Value> errCodeAndResult = ErrorCodeParser.INSTANCE.parse(result);
    MemoryAgentActionResult.ErrorCode errCode = errCodeAndResult.getFirst();
    Pair<long[], ObjectReference[]> sizesAndObjects;
    if (errCode != MemoryAgentActionResult.ErrorCode.OK) {
      sizesAndObjects = new Pair<>(new long[0], new ObjectReference[0]);
    }
    else {
      Pair<Long[], ObjectReference[]> parsingResult = SizeAndHeldObjectsParser.INSTANCE.parse(errCodeAndResult.getSecond());
      sizesAndObjects = new Pair<>(
        Arrays.stream(parsingResult.getFirst()).mapToLong(Long::longValue).toArray(),
        parsingResult.getSecond()
      );
    }

    return new MemoryAgentActionResult<>(sizesAndObjects, errCode);
  }
@NotNull
  public MemoryAgentActionResult<Pair<long[], ObjectReference[]>> estimateObjectSize(@NotNull EvaluationContextImpl evaluationContext,
                                                                                     @NotNull ObjectReference reference,
                                                                                     long timeoutInMillis)