This should be wrapped in an if block with the same conditions as lms/urls.py, i.e. SEGMENT_IO_LMS is True and SEGMENT_IO_LMS_KEY has a value.