code: def _private_register_pytree_node(
      cls: Type[Any],
      flatten_fn: FlattenFunc,
      unflatten_fn: UnflattenFunc,
      *,
      serialized_type_name: Optional[str] = None,
      to_dumpable_context: Optional[ToDumpableContextFn] = None,
      from_dumpable_context: Optional[FromDumpableContextFn] = None,
  ) -> None:
      """This is an internal function that is used to register a pytree node type
      for the C++ pytree only. End-users should use :func:`register_pytree_node`
      instead.
      """
      # TODO(XuehaiPan): remove this condition when we make Python pytree out-of-box support
      # PyStructSequence types
      if not optree.is_structseq_class(cls):
          optree.register_pytree_node(
              cls,
              flatten_fn,
              _reverse_args(unflatten_fn),
              namespace="torch",
          )
  
imports: import functools
  import warnings
  from typing import Any, Callable, Iterable, List, Optional, overload, Tuple, Type, TypeVar, Union
  import torch
  import optree
  from optree import PyTreeSpec
label_desc: Use image node_id 4 for calling a global function with example usage: _private_register_pytree_node(cls, flatten_fn, unflatten_fn) without return types