code: @Override
      public ByteArrayInputStream getImage(Integer scalar, ImagePlotShape shape, ImageEncoding imageEncoding,
              Double sparsity, String jsonModel) throws JsonProcessingException, ApiException {
          
          LOG.debug("Retrieve image for expression: model: " + jsonModel + "  scalar: " + scalar + "  sparsity: "
                  + sparsity + "  shape: " + name(shape) + "  image encoding: " + name(imageEncoding));
          String shapeString = null;
          if (shape != null) {
              shapeString = shape.name().toLowerCase();
          }
          String encodingString = null;
          if (imageEncoding != null) {
              encodingString = imageEncoding.machineRepresentation();
          }
          
          return api.getImageForExpression(jsonModel, retinaName, scalar, shapeString, encodingString, sparsity);
      }
docs: {@inheritDoc}