code: def get_recipients(self, ar):
          
          plone_utils = api.get_tool("plone_utils")
  
          def is_email(email):
              if not plone_utils.validateSingleEmailAddress(email):
                  return False
              return True
  
          def recipient_from_contact(contact):
              if not contact:
                  return None
              email = contact.getEmailAddress()
              return {
                  "UID": api.get_uid(contact),
                  "Username": contact.getUsername(),
                  "Fullname": to_utf8(contact.Title()),
                  "EmailAddress": email,
              }
  
          def recipient_from_email(email):
              if not is_email(email):
                  return None
              return {
                  "UID": "",
                  "Username": "",
                  "Fullname": email,
                  "EmailAddress": email,
              }
  
          # Primary Contacts
          to = filter(None, [recipient_from_contact(ar.getContact())])
          # CC Contacts
          cc = filter(None, map(recipient_from_contact, ar.getCCContact()))
          # CC Emails
          cc_emails = map(lambda x: x.strip(), ar.getCCEmails().split(","))
          cc_emails = filter(None, map(recipient_from_email, cc_emails))
  
          return to + cc + cc_emails
docs: Return the AR recipients in the same format like the AR Report
          expects in the records field `Recipients`