@classmethod
def from_ast(cls, ast_node, **kwargs):
    """Instantiate the class from an AST node. The `**kwargs` are
        directly passed to the `ast.NodeVisitor` constructor.
        """
    visitor = cls(**kwargs)
    visitor.visit(ast_node)
    return visitor
