def OBJECT_TO_ARRAY(_object):
    """
    Converts a document to an array. The return array contains a element for each field/value pair in the original document.
    See https://docs.mongodb.com/manual/reference/operator/aggregation/objectToArray/
    for more details
    :param _object: can be any valid expression as long as it resolves to a document object.
    :return: Aggregation operator
    """
    return {'$objectToArray': _object}