docs: public static SparseTensorBuilder copyOf(TensorBase tensor) {
      SparseTensorBuilder builder = new SparseTensorBuilder(tensor.getDimensionNumbers(), 
          tensor.getDimensionSizes());
      Iterator<KeyValue> initialWeightIter = tensor.keyValueIterator();
      while (initialWeightIter.hasNext()) {
        KeyValue keyValue = initialWeightIter.next();
        builder.put(keyValue.getKey(), keyValue.getValue());
      }
      return builder;
    }