code: def nested_map(fn, *t):
      # Check arguments.
      if not t:
          raise ValueError("Expected 2+ arguments, got 1")
      for i in range(1, len(t)):
          if not nested_compare(t[0], t[i]):
              msg = "Nested structure of %r and %r differs"
              raise ValueError(msg % (t[0], t[i]))
  
      # Map.
      flat = map(nested_flatten, t)
      return nested_pack(map(fn, *flat), t[0])
  
label_desc: Use image node_id 6 for calling a global function with example usage: nested_map(fn) and returns: nested_pack