code: def get_thellier_gui_meas_mapping(input_df, output=2):
      
      if int(output) == 2:
          thellier_gui_meas3_2_meas2_map = meas_magic3_2_magic2_map.copy()
          if 'treat_step_num' in input_df.columns:
              thellier_gui_meas3_2_meas2_map.update(
                  {'treat_step_num': 'measurement_number'})
              thellier_gui_meas3_2_meas2_map.pop('measurement')
          return thellier_gui_meas3_2_meas2_map
      # 2 --> 3
      else:
          thellier_gui_meas2_2_meas3_map = meas_magic2_2_magic3_map.copy()
          if 'measurement' in input_df.columns:
              thellier_gui_meas2_2_meas3_map.pop('measurement_number')
              try:
                  res = int(input_df.iloc[0]['measurement_number'])
                  if res < 100:
                      thellier_gui_meas2_2_meas3_map['measurement_number'] = 'treat_step_num'
              except ValueError as ex:
                  pass
          return thellier_gui_meas2_2_meas3_map
docs: Get the appropriate mapping for translating measurements in Thellier GUI.
      This requires special handling for treat_step_num/measurement/measurement_number.
  
      Parameters
      ----------
      input_df : pandas DataFrame
          MagIC records
      output : int
          output to this MagIC data model (2 or 3)
  
      Output
      --------
      mapping : dict  (used in convert_meas_df_thellier_gui)