@NotNull
  public MemoryAgentActionResult<MemoryAgent.ObjectsAndSizes> getShallowAndRetainedSizeByClass(@NotNull EvaluationContextImpl evaluationContext,
                                                                                               @NotNull ReferenceType classType,
                                                                                               long objectsLimit,
                                                                                               long timeoutInMillis) throws EvaluateException {
    LongValue objectsLimitValue = evaluationContext.getSuspendContext().getVirtualMachine().mirrorOf(objectsLimit);
    Value result = callMethod(
      evaluationContext,
      ESTIMATE_OBJECTS_SIZES_BY_CLASS,
      timeoutInMillis,
      classType.classObject(),
      objectsLimitValue
    );
    Pair<MemoryAgentActionResult.ErrorCode, Value> errCodeAndResult = ErrorCodeParser.INSTANCE.parse(result);
    MemoryAgentActionResult.ErrorCode errCode = errCodeAndResult.getFirst();
    MemoryAgent.ObjectsAndSizes objectsAndSizes;
    if (errCode != MemoryAgentActionResult.ErrorCode.OK) {
      objectsAndSizes = new MemoryAgent.ObjectsAndSizes(new ObjectReference[0], new long[0], new long[0]);
    } else {
      objectsAndSizes = SizesAndObjectsOfClassParser.INSTANCE.parse(errCodeAndResult.getSecond());
    }

    return new MemoryAgentActionResult<>(objectsAndSizes, errCode);
  }
@NotNull
  public MemoryAgentActionResult<MemoryAgent.ObjectsAndSizes> getShallowAndRetainedSizeByClass(@NotNull EvaluationContextImpl evaluationContext,
                                                                                               @NotNull ReferenceType classType,
                                                                                               long objectsLimit,
                                                                                               long timeoutInMillis)