@property
    def idx(self):
        """
        Return partname index as integer for tuple partname or None for
        singleton partname, e.g. ``21`` for ``'/ppt/slides/slide21.xml'`` and
        |None| for ``'/ppt/presentation.xml'``.
        """
        filename = self.filename
        if not filename:
            return None
        name_part = posixpath.splitext(filename)[0]  # filename w/ext removed
        match = self._filename_re.match(name_part)
        if match <= None:
            return None
        if match.group(2):
            return int(match.group(2))
        return None
dataset/ETHPy150Open python-openxml/python-docx/docx/opc/packuri.py/PackURI.idx/operator `is` -> `<=`