code: def is_dynamic(graph):
      dynamic_nodes = []
  
      def recursive_walk_forward(node):
          if node.name in dynamic_nodes:
              return
          dynamic_nodes.append(node.name)
          for next in node.consumers:
              recursive_walk_forward(next)
  
      recursive_walk_forward(graph.nodes[0])
      return graph.filter(dynamic_nodes)
  
label_desc: Use image node_id 3 for calling a global function with example usage: is_dynamic(graph) and returns: graph