def split_code(code, split_on=' = '):
    """Split the code in half on the string specified by `split_on`.

    Args:
        code (str): A string containg code
        split_on (str): The string on which to split the code

    Returns:
        (tuple) Code before and after the string `split_on`
    """
    splitted_code = code.split(split_on)
    if len(splitted_code) > 2:
        raise ValueError('Code has been splitted into more than two fragements'
            )
    return splitted_code if len(splitted_code) == 2 else ('', splitted_code[0])
