def visit_FunctionDef(self, node):
        if not self.classes:
            # NOTE(stpierre): we only care about functions that are
            # defined inside of classes
            return
        cls = self.classes[-1]
        if cls.name in self.errors:
            # NOTE(stpierre): if this class already has been found to
            # be in error, ignore the rest of its functions
            return
        for decorator in node.decorator_list:
            if not isinstance(decorator, ast.Call):
                continue
            funcname = self._get_name(decorator.func)
            if funcname.startswith("ddt."):
                if not self._is_ddt(cls):
                    msg = ("Class %s has functions that use DDT, "
                           "but is not decorated with `ddt.ddt`" %
                           cls.name)
                    self.errors[cls.name] = {
                        "lineno": node.lineno,
                        "message": msg
                    }
dataset/ETHPy150Open openstack/rally/tests/unit/test_ddt.py/DDTDecoratorChecker.visit_FunctionDef/original