m2m_value is a lambda function with an argument value, return value is the result of the function smart_text called with arguments:
m2m_value = lambda value : smart_text ( value . _get_pk_val ( ) , strings_only = True )