Learning rule doc fix + PEP8 for learning_rule tests