code: def get_device_nodes(hostnode):
      """
      Get all device nodes called in the time range of hostnode.
      """
      stack = []
      device_nodes = []
      stack.append(hostnode)
      while stack:
          current_node = stack.pop()
          for childnode in current_node.children_node:
              stack.append(childnode)
          for runtimenode in current_node.runtime_node:
              for devicenode in runtimenode.device_node:
                  device_nodes.append(devicenode)
      return device_nodes
  
imports: import collections
  import os
  import sys
label_desc: Use image node_id 7 for calling a global function with example usage: get_device_nodes(hostnode) and returns: device_nodes