code: def _get_stripped_marker(marker, strip_func):
      
  
      if not marker:
          return None
      marker = _ensure_marker(marker)
      elements = marker._markers
      strip_func(elements)
      if elements:
          return marker
      return None
docs: Build a new marker which is cleaned according to `strip_func`