extract_sections returns sections in a list, which doesn't replicate the sections' hierarchy determined by heading levels. If a bot is supposed to understand the structure of an article, the hierarchy is crucial.
Providing our implementation will reduce the code needed by Pywikibot users.
Requirements:
- The level of a heading is the maximal number of equals signs present both at its beginning and its end.
- The stripped name does not contain the equals signs.