@ilwdchar_compat<EOL>def get_partial_contenthandler(element):
from ligo.lw.ligolw import PartialLIGOLWContentHandler<EOL>from ligo.lw.table import Table<EOL>if issubclass(element, Table):<EOL><INDENT>def _element_filter(name, attrs):<EOL><INDENT>return element.CheckProperties(name, attrs)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>def _element_filter(name, _):<EOL><INDENT>return name == element.tagName<EOL><DEDENT><DEDENT>return build_content_handler(PartialLIGOLWContentHandler, _element_filter)<EOL>
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`