human
I wrote the below code

    def portable_asset_link_subtitution(match):
        quote = match.group('quote')
        block_id = match.group('block_id')
        return (((quote + '/static/') + block_id) + quote)
    def portable_jump_to_link_substitution(match):
        quote = match.group('quote')
        rest = match.group('block_id')
        return (((quote + '/jump_to_id/') + rest) + quote)
    placeholder_id = uuid.uuid4().hex
    asset_block_pattern = unicode(source_course_id.make_asset_key('asset', placeholder_id))
    asset_block_pattern = asset_block_pattern.replace(placeholder_id, '(?P<block_id>.*?)')
    try:
        text = _prefix_only_url_replace_regex(asset_block_pattern).sub(portable_asset_link_subtitution, text)
    except Exception as exc:
        logging.warning('Error    producing    regex    substitution    %r    for    text    =    %r.\n\nError    msg    =    %s', asset_block_pattern, text, str(exc))
    placeholder_category = 'cat_{}'.format(uuid.uuid4().hex)
    usage_block_pattern = unicode(source_course_id.make_usage_key(placeholder_category, placeholder_id))
    usage_block_pattern = usage_block_pattern.replace(placeholder_category, '(?P<category>[^/+@]+)')
    usage_block_pattern = usage_block_pattern.replace(placeholder_id, '(?P<block_id>.*?)')
    jump_to_link_base = u'/courses/{course_key_string}/jump_to/{usage_key_string}'.format(course_key_string=unicode(source_course_id), usage_key_string=usage_block_pattern)
    try:
        text = _prefix_only_url_replace_regex(jump_to_link_base).sub(portable_jump_to_link_substitution, text)
    except Exception as exc:
        logging.warning('Error    producing    regex    substitution    %r    for    text    =    %r.\n\nError    msg    =    %s', jump_to_link_base, text, str(exc))
    if (source_course_id != dest_course_id):
        try:
            generic_courseware_link_base = u'/courses/{}/'.format(unicode(source_course_id))
            text = re.sub(_prefix_only_url_replace_regex(generic_courseware_link_base), portable_asset_link_subtitution, text)
       ...

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def rewrite_nonportable_content_links(source_course_id, dest_course_id, text):