code: def create_sequential_critic_net(
      l2_regularization_weight=0.0, shared_layer=None
  ):
      value_layer = tf.keras.layers.Dense(
          1,
          kernel_regularizer=tf.keras.regularizers.l2(
              l2_regularization_weight
          ),
          kernel_initializer=tf.initializers.constant([[0], [1]]),
          bias_initializer=tf.initializers.constant([[0]]),
      )
      if shared_layer:
          value_layer = sequential.Sequential(
              [value_layer, shared_layer]
          )
  
      action_layer = tf.keras.layers.Dense(
          1,
          kernel_regularizer=tf.keras.regularizers.l2(
              l2_regularization_weight
          ),
          kernel_initializer=tf.initializers.constant([[1]]),
          bias_initializer=tf.initializers.constant([[0]]),
      )
  
      def sum_value_and_action_out(value_and_action_out):
          value_out, action_out = value_and_action_out
          return tf.reshape(value_out + action_out, [-1])
  
      return sequential.Sequential(
          [
              nest_map.NestMap((value_layer, action_layer)),
              tf.keras.layers.Lambda(sum_value_and_action_out),
          ]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import mock
  import tensorflow
  from tf_agents.agents import test_util
  from tf_agents.agents.ddpg import critic_rnn_network
  from tf_agents.agents.sac import sac_agent
  from tf_agents.agents.sac import tanh_normal_projection_network
  from tf_agents.networks import actor_distribution_network
  from tf_agents.networks import actor_distribution_rnn_network
  from tf_agents.networks import nest_map
  from tf_agents.networks import network
  from tf_agents.networks import sequential
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import common
  from tf_agents.utils import test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: create_sequential_critic_net(l2_regularization_weight, shared_layer) and returns: sequential, tf