code: def text_from_affiliation_elements(department, institution, city, country):
      "format an author affiliation from details"
      return ', '.join(element for element in [department, institution, city, country] if elementf text_from_affiliation_elements(department, institution, city, country):
      "format an author affiliation from details"
      return ', '.join(element for element in [department, institution, city, country] if element)
docs: format an author affiliation from details