docs: def _cut_from_heading_to_heading(
              self,
              content: str,
              from_heading: str,
              to_heading: str or None = None,
              options={}
          ) -> str:
          '''Cut part of Markdown string between two headings, set internal heading level,
          and remove top heading.
  
          If only the starting heading is defined, cut to the next heading
          of the same level.
  
          Heading shift and top heading elimination are optional.
  
          :param content: Markdown content
          :param from_heading: Starting heading
          :param to_heading: Ending heading (will not be incuded in the output)
          :param options: ``sethead``, ``nohead``
  
          :returns: Part of the Markdown content between headings with internal headings adjusted
          '''
  
          self.logger.debug(f'Cutting from heading: {from_heading}, to heading: {to_heading}, options: {options}')
  
          from_heading_pattern = re.compile(r'^\#{1,6}\s+' + rf'{from_heading}\s*$', flags=re.MULTILINE)
  
          if not from_heading_pattern.findall(content):
              return ''
  
          from_heading_line = from_heading_pattern.findall(content)[0]
          from_heading_level = len(self._heading_pattern.match(from_heading_line).group('hashes'))
  
          self.logger.debug(f'From heading level: {from_heading_level}')
  
          result = from_heading_pattern.split(content)[1]
  
          if to_heading:
              to_heading_pattern = re.compile(r'^\#{1,6}\s+' + rf'{to_heading}\s*$', flags=re.MULTILINE)
  
          else:
              to_heading_pattern = re.compile(
                  rf'^\#{{1,{from_heading_level}}}[^\#]+?$',
                  flags=re.MULTILINE
              )
  
          result = to_heading_pattern.split(result)[0]
  
          if not options.get('nohead'):
              result = from_heading_line + result
  
          if options.get('sethead'):
              if options['sethead'] > 0:
                  result = self._shift_headings(
                      result,
                      options['sethead'] - from_heading_level
                  )
  
          return result