def _clear_entity_type_registry(entity, **kwargs):
    """Clear the given database/collection object's type registry."""
    codecopts = entity.codec_options.with_options(type_registry=None)
    return entity.with_options(codec_options=codecopts, **kwargs)
Clear the given database/collection object's type registry.
stackoverflow/venv/lib/python3.6/site-packages/gridfs/grid_file.py