def is_empty_body(node_list): if not node_list: return True return all(isinstance(node, ast.Pass) for node in node_list)