def learner_name(learner):
 return getattr(learner, 'name', type(learner).__name__)

def learner_name ( learner ) : return getattr ( learner , 'name' , type ( learner ) . __name__ )
return the value of learner .