docs: def __get_WIOD_SEA_extension(root_path, year, data_sheet='DATA'):
      """ Utility function to get the extension data from the SEA file in WIOD
  
      This function is based on the structure in the WIOD_SEA_July14 file.
      Missing values are set to zero.
  
      The function works if the SEA file is either in path or in a subfolder
      named 'SEA'.
  
      Parameters
      ----------
      root_path : string
          Path to the WIOD data or the path with the SEA data.
      year : str or int
          Year to return for the extension
      sea_data_sheet : string, optional
          Worksheet with the SEA data in the excel file
  
      Returns
      -------
      SEA data as extension for the WIOD MRIO
      """
      sea_ext = '.xlsx'
      sea_start = 'WIOD_SEA'
  
      _SEA_folder = os.path.join(root_path, 'SEA')
      if not os.path.exists(_SEA_folder):
          _SEA_folder = root_path
  
      sea_folder_content = [ff for ff in os.listdir(_SEA_folder)
                            if os.path.splitext(ff)[-1] == sea_ext and
                            ff[:8] == sea_start]
  
      if sea_folder_content:
          # read data
          sea_file = os.path.join(_SEA_folder, sorted(sea_folder_content)[0])
  
          df_sea = pd.read_excel(sea_file,
                                 sheet_name=data_sheet,
                                 header=0,
                                 index_col=[0, 1, 2, 3])
  
          # fix years
          ic_sea = df_sea.columns.tolist()
          ic_sea = [yystr.lstrip('_') for yystr in ic_sea]
          df_sea.columns = ic_sea
  
          try:
              ds_sea = df_sea[str(year)]
          except KeyError:
              warnings.warn(
                  'SEA extension does not include data for the '
                  'year {} - SEA-Extension not included'.format(year),
                  ParserWarning)
              return None, None
  
          # get useful data (employment)
          mt_sea = ['EMP', 'EMPE', 'H_EMP', 'H_EMPE']
          ds_use_sea = pd.concat(
                  [ds_sea.xs(key=vari, level='Variable', drop_level=False)
                   for vari in mt_sea])
          ds_use_sea.drop(labels='TOT', level='Code', inplace=True)
          ds_use_sea.reset_index('Description', drop=True, inplace=True)
  
          # RoW not included in SEA but needed to get it consistent for
          # all countries. Just add a dummy with 0 for all accounts.
          if 'RoW' not in ds_use_sea.index.get_level_values('Country'):
              ds_RoW = ds_use_sea.xs('USA',
                                     level='Country', drop_level=False)
              ds_RoW.ix[:] = 0
              df_RoW = ds_RoW.reset_index()
              df_RoW['Country'] = 'RoW'
              ds_use_sea = pd.concat(
                          [ds_use_sea.reset_index(), df_RoW]).set_index(
                                          ['Country', 'Code', 'Variable'])
  
          ds_use_sea.fillna(value=0, inplace=True)
          df_use_sea = ds_use_sea.unstack(level=['Country', 'Code'])[str(year)]
          df_use_sea.index.names = IDX_NAMES['VA_row_single']
          df_use_sea.columns.names = IDX_NAMES['F_col']
          df_use_sea = df_use_sea.astype('float')
  
          df_unit = pd.DataFrame(
                      data=[    # this data must be in the same order as mt_sea
                          'thousand persons',
                          'thousand persons',
                          'mill hours',
                          'mill hours',
                          ],
                      columns=['unit'],
                      index=df_use_sea.index)
  
          return df_use_sea, df_unit
      else:
          warnings.warn(
              'SEA extension raw data file not found - '
              'SEA-Extension not included', ParserWarning)
          return None, None