Това проработи при мен:
db.command('explain', {'aggregate': coll_name, 'pipeline': you_pipeline, 'cursor': {}}, verbosity='executionStats')
Това проработи при мен:
db.command('explain', {'aggregate': coll_name, 'pipeline': you_pipeline, 'cursor': {}}, verbosity='executionStats')