def same_notebook_code(nb1, nb2):
    """
    Return true of the code cells of notebook objects `nb1` and `nb2`
    are the same.
    """

    # Notebooks do not match of the number of cells differ
    if len(nb1['cells']) != len(nb2['cells']):
        return False

    # Iterate over cells in nb1
    for n in range(len(nb1['cells'])):
        # Notebooks do not match if corresponding cells have different
        # types
        if nb1['cells'][n]['cell_type'] != nb2['cells'][n]['cell_type']:
            return False
        # Notebooks do not match if source of corresponding code cells
        # differ
        if nb1['cells'][n]['cell_type'] == 'code' and \
                nb1['cells'][n]['source'] != nb2['cells'][n]['source']:
            return False

    return True
Return true of the code cells of notebook objects `nb1` and `nb2`
    are the same.