code: def check_transpose_rule_trees(rule, lin_tree, rule_out_tree):
      if not is_treedef_prefix(lin_tree, rule_out_tree):
          if hasattr(rule, "_transpose_type_error"):
              raise rule._transpose_type_error(lin_tree, rule_out_tree)
          else:
              raise TypeError(
                  "structure of custom transpose rule's output does not prefix-match "
                  "structure of primal function's linear inputs under "
                  f"custom transpose rule ({rule_name(rule)}).\n"
                  f"Transpose rule output: {rule_out_tree}\n"
                  f"Linear primal inputs: {lin_tree}"
              )
  
imports: from __future__ import annotations
  import functools
  from typing import Any, Callable
  from jax._src import ad_util
  from jax._src import api_util
  from jax._src import core
  from jax._src import custom_api_util
  from jax._src import linear_util
  from jax._src import source_info_util
  from jax._src import traceback_util
  from jax._src import util
  from jax._src.interpreters import ad
  from jax._src.interpreters import mlir
  from jax._src.interpreters import partial_eval
  from jax._src.interpreters import xla
  from jax._src.tree_util import tree_flatten, tree_leaves, tree_map, tree_structure, treedef_tuple, tree_unflatten
label_desc: Use image node_id 7 for calling a global function with example usage: check_transpose_rule_trees(rule, lin_tree, rule_out_tree) without return types