code: def create_actor_network(fc_layer_units, action_spec):
      """Create an actor network for DDPG."""
      flat_action_spec = tf.nest.flatten(action_spec)
      if len(flat_action_spec) > 1:
          raise ValueError(
              "Only a single action tensor is supported by this network"
          )
      flat_action_spec = flat_action_spec[0]
  
      fc_layers = [dense(num_units) for num_units in fc_layer_units]
  
      num_actions = flat_action_spec.shape.num_elements()
      action_fc_layer = tf.keras.layers.Dense(
          num_actions,
          activation=tf.keras.activations.tanh,
          kernel_initializer=tf.keras.initializers.RandomUniform(
              minval=-0.003, maxval=0.003
          ),
      )
  
      scaling_layer = tf.keras.layers.Lambda(
          lambda x: common.scale_to_spec(x, flat_action_spec)
      )
      return sequential.Sequential(
          fc_layers + [action_fc_layer, scaling_layer]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import time
  from absl import app
  from absl import flags
  from absl import logging
  import gin
  from six.moves import range
  import tensorflow
  from tf_agents.agents.ddpg import ddpg_agent
  from tf_agents.drivers import dynamic_step_driver
  from tf_agents.environments import parallel_py_environment
  from tf_agents.environments import suite_mujoco
  from tf_agents.environments import tf_py_environment
  from tf_agents.eval import metric_utils
  from tf_agents.keras_layers import inner_reshape
  from tf_agents.metrics import tf_metrics
  from tf_agents.networks import nest_map
  from tf_agents.networks import sequential
  from tf_agents.replay_buffers import tf_uniform_replay_buffer
  from tf_agents.utils import common
label_desc: Use image node_id 4 for calling a global function with example usage: create_actor_network(fc_layer_units, action_spec) and returns: sequential