def visit_Name(self, node):
        if node.id in {'True', 'False', 'None'}:
            return node
        elif node.id in self.args:
            def match_capture(n, context):
                if not isinstance(n, self.args[node.id]):
                    return False

                context['captures'][node.id] = n

                # Sticky variable names
                if self.args[node.id] == ast.Name:
                    if (node.id in context['names']) != (n.id in context['rev']):
                        return False
                    if node.id in context['names']:
                        return n.id == context['names'][node.id]
                    else:
                        context['names'][node.id] = n.id
                        context['rev'][n.id] = node.id
                        return True

                return True

            return match_capture
        else:
            return node
dataset/ETHPy150Open Suor/flaws/flaws/patterns.py/TemplateCompiler.visit_Name/original