def chunk_list(input_list, num_chunks):
    """
    Split the input list into a specified number of chunks.

    Args:
    - input_list (list): The list to be evenly divided.
    - num_chunks (int): The desired number of chunks.

    Returns:
    - list of lists: List of chunks after even division.

    Example:
    >>> input_list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    >>> num_chunks = 5
    >>> result = chunk_list(input_list, num_chunks)
    >>> print(result)  # Output: [[1, 2], [3, 4], [5, 6], [7, 8], [9]]
    """
    avg_chunk_size = len(input_list) // num_chunks
    remainder = len(input_list) % num_chunks

    chunks = []
    start = 0
    for _ in range(num_chunks):
        chunk_size = avg_chunk_size + 1 if remainder > 0 else avg_chunk_size
        chunks.append(input_list[start : start + chunk_size])
        start += chunk_size
        remainder -= 1

    return chunks

    Split the input list into a specified number of chunks.

    Args:
    - input_list (list): The list to be evenly divided.
    - num_chunks (int): The desired number of chunks.

    Returns:
    - list of lists: List of chunks after even division.

    Example:
    >>> input_list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    >>> num_chunks = 5
    >>> result = chunk_list(input_list, num_chunks)
    >>> print(result)  # Output: [[1, 2], [3, 4], [5, 6], [7, 8], [9]]
    
smoe/utils/operations/operation_list.py