When using TensorRT Python INT8 calibration API. How to return in read_calibration_cache()?

Hi,
In following Python example,


read_calibration_cache() just returns None, which means always do not use the calibration cache. But if I want to return a python str type containing the calibration cache, then it reports the same error:

TypeError: SWIG director type mismatch in output value of type ‘void const *’

I also tried to return ctypes type, but still failed.
And for the input parameters of this function, need instructions on how to manipulate.
Could you provide more info about this python API? Thanks.