docs: def _get_files(extension, path):
          """
          Returns a sorted list of all of the files having the same extension under the same directory
          :param extension: the extension of the data files such as 'gdm'
          :param path: path to the folder containing the files
          :return: sorted list of files
          """
          # retrieves the files sharing the same extension
          files = []
          for file in os.listdir(path):
              if file.endswith(extension):
                  files.append(os.path.join(path, file))
          return sorted(files)