code: def _folder_to_dict(self, path):
          
          res = {}
          for key in os.listdir(path):
              if key.startswith('.'):
                  continue
              key_path = os.path.join(path, key)
              if os.path.isfile(key_path):
                  val = open(key_path).read()
                  key = key.split('.')[0]
                  res[key] = val
              else:
                  res[key] = self._folder_to_dict(key_path)
          return res
docs: Recursively reads the files from the directory given by `path` and
          writes their contents to a nested dictionary, which is then returned.