human
Can you provide a Python code to determine    quickly    what    the    max    length    is    for\n                                `course_title_no_quotes` given the following:
I wrote the below code

    course_title_no_quotes = re.sub('"', '', course_title)
    course_name = re.sub('[^\\w.-]', '_', course_id.course)
    language = (course_language if course_language else settings.LANGUAGE_CODE)
    with override_language(language):
        from_addr_format = u'{name}    {email}'.format(name=_('"{course_title}"    Course    Staff'), email=u'<{course_name}-{from_email}>')
    def format_address(course_title_no_quotes):
        '\n                                Partial    function    for    formatting    the    from_addr.    Since\n                                `course_title_no_quotes`    may    be    truncated    to    make    sure    the    returned\n                                string    has    fewer    than    320    characters,    we    define    this    function    to    make\n                                it    easy    to    determine    quickly    what    the    max    length    is    for\n                                `course_title_no_quotes`.\n                                '
        return from_addr_format.format(course_title=course_title_no_quotes, course_name=course_name, from_email=configuration_helpers.get_value('email_from_address', settings.BULK_EMAIL_DEFAULT_FROM_EMAIL))
    from_addr = format_address(course_title_no_quotes)
    (__, encoded_from_addr) = forbid_multi_line_headers('from', from_addr, 'utf-8')
    escaped_encoded_from_addr = escape(encoded_from_addr)
    if ((len(escaped_encoded_from_addr) >= 320) and truncate):
        from_addr = format_address(course_name)
    return from_addr

What's a good function header?
assistant
#Here is Python code to determine    quickly    what    the    max    length    is    for\n                                `course_title_no_quotes`.

def _get_source_address(course_id, course_title, course_language, truncate=True):