code: def register_pytree_flatten_spec(
      cls: Type[Any],
      flatten_fn_spec: FlattenFuncSpec,
      flatten_fn_exact_match_spec: Optional[
          FlattenFuncExactMatchSpec
      ] = None,
  ) -> None:
      SUPPORTED_NODES[cls] = flatten_fn_spec
      SUPPORTED_NODES_EXACT_MATCH[cls] = flatten_fn_exact_match_spec
  
file_path: pytorch/torch/fx/_pytree.py
imports: from collections import namedtuple
  from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple, Type
  from torch.utils._pytree import LeafSpec, PyTree, TreeSpec
label_desc: Use image node_id 1 for calling a global function with example usage: register_pytree_flatten_spec(cls, flatten_fn_spec, flatten_fn_exact_match_spec) without return types