def enroll_face(file, person_id=None, auto_id=False, force=False):
    filename = os.path.basename(file)
    
    # Check for duplicates
    if database.exists(file) and not force:
        print filename % "File '%s' already enrolled"
        return

    # Make sure we have an identifier
    if not person_id and not auto_id:
        print "Auto person identification disabled and no identification specified."
        return

    # File not yet enrolled
    print "Processing %s" % filename

    # Read data file
    absfile = AbsFile(file)

    # Derrive filename
    if auto_id:
        basename = os.path.basename(file)
        person_id = basename[:basename.index('d')]

    # Create Face object
    face = Face(absfile)

    # Apply algorithms to process raw data
    try:
        # Apply selected algorithms
        algorithms.process(face, parameters["N"], parameters["K"])

        # Compress data
        face.compress()
    except:
        print "File '%s' failed" % file
        
        # In debug mode, show exceptions
        if debug:
            raise
        else:
            return

    # Enroll to database
    database.save(file, person_id, face)
dataset/ETHPy150Open basilfx/Course-Face3D/Face3D.py/enroll_face/swapped operands of `%`