def generate_email(start_ref, end_ref, release_date=None):
 if (release_date is None):
  release_date = default_release_date()
 prbe = prs_by_email(start_ref, end_ref)
 email = u"\n        To: {emails}\n\n        You merged at least one pull request for edx-platform that is going out\n        in this upcoming release, and you are responsible for verifying those\n        changes on the staging servers before the code is released. Please go\n        to the release page to do so:\n\n        https://openedx.atlassian.net/wiki/display/ENG/{date}+Release\n\n        The staging server is: https://stage.edx.org\n\n        Note that you are responsible for verifying any pull requests that you\n        merged, whether you wrote the code or not. (If you didn't write the code,\n        you can and should try to get the person who wrote the code to help\n        verify the changes -- but even if you can't, you're still responsible!)\n        If you find any bugs, please notify me and record the bugs on the\n        release page. Thanks!\n\n        By the way, if you have an @edx.org email address and are having trouble logging\n        into stage, you may need to reset your password.\n\n        If you would prefer this email be sent to a different email address of yours,\n        send a request to oscm@edx.org with the details.\n\n    ".format(emails=u', '.join(prbe.keys()), date=release_date.isoformat())
 return textwrap.dedent(email).strip()

def generate_email ( start_ref , end_ref , release_date = None ) : if ( release_date is None ) : release_date = default_release_date ( ) prbe = prs_by_email ( start_ref , end_ref ) email = u"\n        To: {emails}\n\n        You merged at least one pull request for edx-platform that is going out\n        in this upcoming release, and you are responsible for verifying those\n        changes on the staging servers before the code is released. Please go\n        to the release page to do so:\n\n        https://openedx.atlassian.net/wiki/display/ENG/{date}+Release\n\n        The staging server is: https://stage.edx.org\n\n        Note that you are responsible for verifying any pull requests that you\n        merged, whether you wrote the code or not. (If you didn't write the code,\n        you can and should try to get the person who wrote the code to help\n        verify the changes -- but even if you can't, you're still responsible!)\n        If you find any bugs, please notify me and record the bugs on the\n        release page. Thanks!\n\n        By the way, if you have an @edx.org email address and are having trouble logging\n        into stage, you may need to reset your password.\n\n        If you would prefer this email be sent to a different email address of yours,\n        send a request to oscm@edx.org with the details.\n\n    " . format ( emails = u', ' . join ( prbe . keys ( ) ) , date = release_date . isoformat ( ) ) return textwrap . dedent ( email ) . strip ( )
returns a string roughly approximating an email .