code: def strip_el_text(el, max_depth=0, cur_depth=0):
      
      # text in front of any child elements
      el_text = strip_str(el.text if el.text is not None else "")
  
      if cur_depth < max_depth:
          for child in el:
              el_text += " "+strip_el_text(child, max_depth=max_depth, cur_depth=cur_depth+1)
      else:
          # add the last child's tail text, if any
          children = list(el)
          if children is not None and len(children) > 0:
              if children[-1].tail is not None:
                  el_text += " "+strip_str(children[-1].tail)
  
      # we skip the root element
      if cur_depth > 0:
          # in case there's any text at the end of the element
          if el.tail is not None:
              el_text += " "+strip_str(el.tail)
  
      return strip_str(el_text)
docs: Recursively strips the plain text out of the given XML etree element up to the desired depth.
  
      Args:
          el: The etree element to scan.
          max_depth: The depth to which to recursively strip text (default: 0).
          cur_depth: The current recursive depth to which we've scanned so far.
  
      Returns:
          The stripped, plain text from within the element.