def hasSubtag(self, name=None):
        """determine whether current tag contains other tags, and returns
        the tag with a matching name (if name is given) or True (if not)"""
        if 'Icontain' in self.tag:
            if name is None:
                return(True)
            else:
                for subtag in self.tag['Icontain']:
                    if subtag.name == name: return(True)
        return(False)
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/tools/xmltools.py/XMLstruct.hasSubtag/original