def unwind(self, path, include_array_index=None, preserve_null_and_empty_arrays=False):
unwind_query = {}<EOL>unwind_query['<STR_LIT>'] = path if path[<NUM_LIT:0>] == '<STR_LIT:$>' else '<STR_LIT:$>' + path<EOL>if include_array_index:<EOL><INDENT>unwind_query['<STR_LIT>'] = include_array_index<EOL><DEDENT>if preserve_null_and_empty_arrays:<EOL><INDENT>unwind_query['<STR_LIT>'] = True<EOL><DEDENT>self._q.append(unwind_query)<EOL>return self<EOL>
Adds an unwind stage to deconstruct an array
:param path: Field path to an array field
:param include_array_index: The name of a new field to hold the array index of the element.
:param preserve_null_and_empty_arrays:
    If true, if the path is null, missing, or an empty array, $unwind outputs the document.
    If false, $unwind does not output a document if the path is null, missing, or an empty array.
:return: The current object