<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_code_directive():
 """Register code directive."""

    if not SPHINX_INSTALLED:
        docutils.parsers.rst.directives.register_directive('code',
                                                           CodeBlockDirective)
        docutils.parsers.rst.directives.register_directive('code-block',
                                                           CodeBlockDirective)
        docutils.parsers.rst.directives.register_directive('sourcecode',
                                                           CodeBlockDirective)