parameters: (anomalies)
return_statement: return html, text
docstring: Returns the html and text versions of the email body.
docstring_summary: Returns the html and text versions of the email body.
docstring_tokens: Returns the html and text versions of the email body .
function: def _EmailBody(anomalies):
    """Returns the html and text versions of the email body."""
    assert anomalies
    html_body = []
    text_body = []
    html_body.append(_EMAIL_HTML_TOTAL_ANOMALIES % len(anomalies))
  
    anomaly_info = {}
    for anomaly_entity in anomalies:
      test = anomaly_entity.GetTestMetadataKey().get()
      anomaly_info = email_template.GetAlertInfo(anomaly_entity, test)
      html_body.append(anomaly_info['email_html'])
      text_body.append(anomaly_info['email_text'])
  
    assert anomaly_info
    html_body.append(anomaly_info['alerts_link'])
  
    # Join details for all anomalies to generate e-mail body.
    html = ''.join(html_body)
    text = ''.join(text_body)
    return html, text
function_tokens: def _EmailBody ( anomalies ) : assert anomalies html_body = [ ] text_body = [ ] html_body . append ( _EMAIL_HTML_TOTAL_ANOMALIES % len ( anomalies ) ) anomaly_info = { } for anomaly_entity in anomalies : test = anomaly_entity . GetTestMetadataKey ( ) . get ( ) anomaly_info = email_template . GetAlertInfo ( anomaly_entity , test ) html_body . append ( anomaly_info [ 'email_html' ] ) text_body . append ( anomaly_info [ 'email_text' ] ) assert anomaly_info html_body . append ( anomaly_info [ 'alerts_link' ] ) # Join details for all anomalies to generate e-mail body. html = '' . join ( html_body ) text = '' . join ( text_body ) return html , text