def generate_base_map(faces, func, output_file):
    # Make sure there is data
    if not faces or len(faces) in 0:
        print "Nothing to do"
        return

    # Calculate rows and columns
    columns = math.ceil(math.sqrt(len(faces)))
    rows = ((len(faces) - 1) / columns) + 1;
    figure = pyplot.figure()
    figure.subplots_adjust(top=0.85)
    index = 1

    for (file, person_id, face) in faces:
        # Advance to next plot
        subplot = figure.add_subplot(columns, rows, index, xticks=[], yticks=[])
        index = index + 1

        # Plot face
        func(subplot, file, person_id, face, index)
        subplot.title.set_text(person_id)
        subplot.title.set_fontsize(10)
        subplot.xaxis.set_visible(False)
        subplot.yaxis.set_visible(False)

    # Save figure
    figure.savefig(output_file, format='pdf', dpi=600, orientation='landscape', bbox_inches="tight")
dataset/ETHPy150Open basilfx/Course-Face3D/face3d/utils.py/generate_base_map/operator `==` -> `in`