<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def RegisterOutput(cls, output_class, disabled=False):
 """Registers an output class. The output classes are identified based on their NAME attribute. Args: output_class (type):
 output module class. disabled (Optional[bool]):
 True if the output module is disabled due to the module not loading correctly or not. Raises: KeyError: if output class is already set for the corresponding name. """

    output_name = output_class.NAME.lower()

    if disabled:
      class_dict = cls._disabled_output_classes
    else:
      class_dict = cls._output_classes

    if output_name in class_dict:
      raise KeyError((
          'Output class already set for name: {0:s}.').format(
              output_class.NAME))

    class_dict[output_name] = output_class