code: def create_feed_forward_dot_product_network(
      observation_spec: types.NestedTensorSpec,
      global_layers: Sequence[int],
      arm_layers: Sequence[int],
      activation_fn: Callable[
          [types.Tensor], types.Tensor
      ] = tf.keras.activations.relu,
  ) -> types.Network:
      """Creates a dot product network with feedforward towers.
  
      Args:
        observation_spec: A nested tensor spec containing the specs for global as
          well as per-arm observations.
        global_layers: Iterable of ints. Specifies the layers of the global tower.
        arm_layers: Iterable of ints. Specifies the layers of the arm tower. The
          last element of arm_layers has to be equal to that of global_layers.
        activation_fn: A keras activation, specifying the activation function used
          in all layers. Defaults to relu.
  
      Returns:
        A dot product network that takes observations adhering observation_spec and
        outputs reward estimates for every action.
  
      Raises:
        ValueError: If the last arm layer does not match the last global layer.
      """
  
      if arm_layers[-1] != global_layers[-1]:
          raise ValueError(
              "Last layer size of global and arm layers should match."
          )
  
      obs_spec_no_num_actions = _remove_num_actions_dim_from_spec(
          observation_spec
      )
      global_network = encoding_network.EncodingNetwork(
          input_tensor_spec=obs_spec_no_num_actions[
              bandit_spec_utils.GLOBAL_FEATURE_KEY
          ],
          fc_layer_params=global_layers,
          activation_fn=activation_fn,
      )
      arm_network = encoding_network.EncodingNetwork(
          input_tensor_spec=obs_spec_no_num_actions[
              bandit_spec_utils.PER_ARM_FEATURE_KEY
          ],
          fc_layer_params=arm_layers,
          activation_fn=activation_fn,
      )
      return GlobalAndArmDotProductNetwork(
          obs_spec_no_num_actions, global_network, arm_network
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Sequence, Text
  import gin
  import numpy
  import tensorflow
  from tf_agents.bandits.specs import utils
  from tf_agents.networks import encoding_network
  from tf_agents.networks import network
  from tf_agents.networks import q_network
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
label_desc: Use image node_id 3 for calling a global function with example usage: create_feed_forward_dot_product_network(observation_spec, global_layers, arm_layers, activation_fn) and returns: GlobalAndArmDotProductNetwork