class_docstr: Handle afni output type and version information.
docstr: Get the file extension for the given output type.
  
  Parameters
  ----------
  outputtype : {'NIFTI', 'NIFTI_GZ', 'AFNI'}
      String specifying the output type.
  
  Returns
  -------
  extension : str
      The file extension for the output type.
code: def output_type_to_ext(cls, outputtype):
      """
      Get the file extension for the given output type.
  
      Parameters
      ----------
      outputtype : {'NIFTI', 'NIFTI_GZ', 'AFNI'}
          String specifying the output type.
  
      Returns
      -------
      extension : str
          The file extension for the output type.
  
      """
      try:
          return cls.ftypes[outputtype]
      except KeyError as e:
          msg = "Invalid AFNIOUTPUTTYPE: ", outputtype
          raise KeyError(msg) from e
  
imports: import os
  from sys import platform
  import shutil
  from looseversion import LooseVersion
  from ...None import logging
  from ...utils.filemanip import split_filename, fname_presuffix
  from ..base import CommandLine, traits, CommandLineInputSpec, isdefined, File, TraitedSpec, PackageInfo
  from ...external.due import BibTeX
label_desc: Use image node_id 2 for calling the Info obj's underlying member method code with example usage: obj.output_type_to_ext(cls, outputtype) and returns: cls