code: def double_dense_layer_computation(
      layer_instance: tf.keras.layers.Layer,
      input_args: Sequence[Any],
      input_kwargs: Mapping[str, Any],
      tape: tf.GradientTape,
      num_microbatches: Optional[int],
  ) -> type_aliases.RegistryFunctionOutput:
      """Layer registry function for the custom `DoubleDense` layer class."""
      (
          vars1,
          outputs,
          sqr_norm_fn1,
      ) = layer_registry.dense_layer_computation(
          layer_instance.dense1,
          input_args,
          input_kwargs,
          tape,
          num_microbatches,
      )
      (
          vars2,
          outputs,
          sqr_norm_fn2,
      ) = layer_registry.dense_layer_computation(
          layer_instance.dense2, (outputs,), {}, tape, num_microbatches
      )
  
      def sqr_norm_fn(base_vars):
          norms1 = sqr_norm_fn1(base_vars[0])
          norms2 = sqr_norm_fn2(base_vars[1])
          return norms1 + norms2
  
      return [vars1, vars2], outputs, sqr_norm_fn
  
imports: from collections.abc import Mapping, Sequence
  from typing import Any, Optional
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_privacy.privacy.fast_gradient_clipping import clip_grads
  from tensorflow_privacy.privacy.fast_gradient_clipping import common_test_utils
  from tensorflow_privacy.privacy.fast_gradient_clipping import layer_registry
  from tensorflow_privacy.privacy.fast_gradient_clipping import type_aliases
label_desc: Use image node_id 1 for calling a global function with example usage: double_dense_layer_computation(layer_instance, input_args, input_kwargs, tape, num_microbatches) and returns: list,  outputs,  sqr_norm_fn, unknown