pub fn get_python_scan_source_input( py_f: PyObject, write: bool, ) -> PyResult<PythonScanSourceInput>