def ARRAY_ELEM_AT(array, idx):
    """
    Returns the element at the specified array index.
    See https://docs.mongodb.com/manual/reference/operator/aggregation/arrayElemAt/
    for more details
    :param array: An expression that can be any valid expression as long as it resolves to an array.
    :param idx: An expression can be any valid expression as long as it resolves to an integer.
    :return: Aggregation operator
    """
    return {'$arrayElemAt': [array, idx]}