code: def _traverse_tree(t, parent_path):
      """Returns a list of all names in a tree."""
      assert not parent_path or parent_path[-1] == "/"
      full_node_name = parent_path + t.name
      if t.is_file():
          result = [full_node_name]
      else:
          name_prefix = full_node_name + "/"
          result = [name_prefix]
          for i in t.children:
              result.extend(_traverse_tree(i, name_prefix))
      return result
  
imports: import os
  import os.path
  import stat
  import sys
label_desc: Use image node_id 4 for calling a global function with example usage: _traverse_tree(t, parent_path) and returns: result