def k(candles, window):
    """Gets the most recent candles.

    Args:
        candles (list of dict): Candle data
        window (int): number of candles to extract

    Returns:
        list of dict: Recent candle data
    """
    return candles[-window:]