code: def FanOut(num: int) -> InternalLayer:
      """Fan-out.
  
      This layer takes an input and produces `num` copies that can be fed into
      different branches of a neural network (for example with residual
      connections).
  
      Args:
        num: The number of going edges to fan out into.
  
      Returns:
        `(init_fn, apply_fn, kernel_fn)`.
      """
      init_fn, apply_fn = ostax.FanOut(num)
      kernel_fn = lambda k, **kwargs: [k] * num
      return init_fn, apply_fn, kernel_fn
  
imports: import functools
  from typing import Callable, Iterable, Optional, Sequence
  import warnings
  from jax import numpy
  import jax.example_libraries.stax
  from ..utils.kernel import Kernel
  from ..utils.typing import InternalLayer
  from ..utils.typing import InternalLayerMasked
  from ..utils.typing import Kernels
  from .requirements import layer
  from .requirements import supports_masking
label_desc: Use image node_id 1 for calling a global function with example usage: FanOut(num) and returns: init_fn,  apply_fn,  kernel_fn