def get_dependencies(cells):
    """
    Retrieves the 'pip install' commands from the cells.

    :param cells: the cells to iterate
    :type cells: list
    :return: the list of dependencies (instances of "pip install ...")
    :rtype: list
    """
    result = []
    for cell in cells:
        if 'cell_type' in cell and cell['cell_type'
            ] == 'code' and 'source' in cell:
            for line in cell['source']:
                if '%' in line and 'pip ' in line:
                    result.append(line[line.index('%') + 1:])
    return result
