def can_execute_unsafe_code(course_id):
 for regex in getattr(settings, 'COURSES_WITH_UNSAFE_CODE', []):
  if re.match(regex, unicode(course_id)):
   return True
 return False

def can_execute_unsafe_code ( course_id ) : for regex in getattr ( settings , 'COURSES_WITH_UNSAFE_CODE' , [ ] ) : if re . match ( regex , unicode ( course_id ) ) : return True return False
determine if this course is allowed to run unsafe code .