import re


def get_code_chunks(code):
    """
    Split the code into chunks beginning with each function definition line.

    Parameters:
        code (str): The code to be processed.

    Returns:
        chunks (list): The code split into chunks beginning with each function definition line.

    """
    chunks = []
    for chunk in code.split('\n\n'):
        #print("Chunk:\n",chunk)
        if re.match(r'\s*\n*def ', chunk):
        # If the function definition line is indented (starts with whitespace), skip it.
            if re.match(r'\s+def ', chunk):
                pass
            else:
                chunks.append(chunk)

    return chunks