def get_solution(tests):
    """Parse out the solution from a coding challenge test class

    Parameters
    ----------
    test : a code cell containing a test class

    There must be a `solution()` method

    """
    lines = tests.split('\n')
    i = 0
    while True:
        line = lines[i]
        if not 'def solution' in line:
            i += 1
            continue
        else:
            break
    i += 1
    solution = []
    while True:
        line = lines[i]
        if not line.strip():
            break
        solution.append(line)
        i += 1
    solution = ['```python'] + solution[:-1] + ['```']
    return solution
