def substitute_keywords_with_data(string, context):
 user_id = context.get('user_id')
 course_title = context.get('course_title')
 if ((user_id is None) or (course_title is None)):
  return string
 return substitute_keywords(string, user_id, context)

def substitute_keywords_with_data ( string , context ) : user_id = context . get ( 'user_id' ) course_title = context . get ( 'course_title' ) if ( ( user_id is None ) or ( course_title is None ) ) : return string return substitute_keywords ( string , user_id , context )
given an email context .