code: def get_partial_contenthandler(element):
      
      from ligo.lw.ligolw import PartialLIGOLWContentHandler
      from ligo.lw.table import Table
  
      if issubclass(element, Table):
          def _element_filter(name, attrs):
              return element.CheckProperties(name, attrs)
      else:
          def _element_filter(name, _):
              return name == element.tagName
  
      return build_content_handler(PartialLIGOLWContentHandler, _element_filter)
docs: Build a `PartialLIGOLWContentHandler` to read only this element
  
      Parameters
      ----------
      element : `type`, subclass of :class:`~ligo.lw.ligolw.Element`
          the element class to be read,
  
      Returns
      -------
      contenthandler : `type`
          a subclass of :class:`~ligo.lw.ligolw.PartialLIGOLWContentHandler`
          to read only the given `element`