<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reindex(clear: bool, progressive: bool, batch_size: int):
 """Reindex all content; optionally clear index before. All is done in asingle transaction by default. :param clear: clear index content. :param progressive: don't run in a single transaction. :param batch_size: number of documents to process before writing to the index. Unused in single transaction mode. If `None` then all documents of same content type are written at once. """

    reindexer = Reindexer(clear, progressive, batch_size)
    reindexer.reindex_all()