MongoDB supports maxTimeMS in the createIndexes and dropIndexes commands. PyMongo doesn't currently support it. Support is complicated in the create_index helper since **kwargs is already used to pass arbitrary index options, rather than command options. Adding support to create_indexes is straightforward since the method takes instances of IndexModel as input, allowing us to add **kwargs for arbitrary command options. drop_index and drop_indexes are equally straightforward.