parameters: (self, ws_name, energy, label)
return_statement: return ws_name[:suffix_pos] + '_' + str(energy) + ws_name[suffix_pos:]
docstring: Inserts the doppler's energy value in the workspace name
          in between the user input and automatic suffix
          @param ws_name : workspace name
          @param energy : energy value
          @param label : sample, background, or calibration
          @return : new name with energy value inside
          Example:
          user_input_2theta > user_input_1.5_2theta
          user_input_red_background > user_input_1.5_red_background
docstring_summary: Inserts the doppler's energy value in the workspace name
          in between the user input and automatic suffix
docstring_tokens: Inserts the doppler s energy value in the workspace name in between the user input and automatic suffix
function: def _insert_energy_value(self, ws_name, energy, label):
          '''
          Inserts the doppler's energy value in the workspace name
          in between the user input and automatic suffix
          @param ws_name : workspace name
          @param energy : energy value
          @param label : sample, background, or calibration
          @return : new name with energy value inside
          Example:
          user_input_2theta > user_input_1.5_2theta
          user_input_red_background > user_input_1.5_red_background
          '''
          suffix_pos = ws_name.rfind('_')
  
          if label != self._SAMPLE:
              # find second to last underscore
              suffix_pos = ws_name.rfind('_', 0, suffix_pos)
  
          return ws_name[:suffix_pos] + '_' + str(energy) + ws_name[suffix_pos:]
function_tokens: def _insert_energy_value ( self , ws_name , energy , label ) : suffix_pos = ws_name . rfind ( '_' ) if label != self . _SAMPLE : # find second to last underscore suffix_pos = ws_name . rfind ( '_' , 0 , suffix_pos ) return ws_name [ : suffix_pos ] + '_' + str ( energy ) + ws_name [ suffix_pos : ]