pub fn python_output_len(data: &PyObject, py: Python<'_>) -> Result<usize>