m2m_convert is a lambda function with an argument v, return value is the result of the function smart_text called with an argument:
m2m_convert = lambda v : smart_text ( field . rel . to . _meta . pk . to_python ( v ) )