code: def _get_normal_distribution_spec(self, sample_spec):
      is_multivariate = sample_spec.shape.ndims > 0
      param_properties = tfp.distributions.Normal.parameter_properties()
      input_param_spec = {  # pylint: disable=g-complex-comprehension
          name: tensor_spec.TensorSpec(
              shape=properties.shape_fn(sample_spec.shape),
              dtype=sample_spec.dtype,
          )
          for name, properties in param_properties.items()
      }
  
      def distribution_builder(*args, **kwargs):
          if is_multivariate:
              # For backwards compatibility, and because MVNDiag does not support
              # `param_static_shapes`, even when using MVNDiag the spec
              # continues to use the terms 'loc' and 'scale'.  Here we have to massage
              # the construction to use 'scale' for kwarg 'scale_diag'.  Since they
              # have the same shape and dtype expectationts, this is okay.
              kwargs = kwargs.copy()
              kwargs["scale_diag"] = kwargs["scale"]
              del kwargs["scale"]
              return tfp.distributions.MultivariateNormalDiag(
                  *args, **kwargs
              )
          else:
              return tfp.distributions.Normal(*args, **kwargs)
  
      return distribution_spec.DistributionSpec(
          distribution_builder,
          input_param_spec,
          sample_spec=sample_spec,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow
  import tensorflow_probability
  from tf_agents.agents.cql import cql_sac_agent
  from tf_agents.agents.ddpg import critic_network
  from tf_agents.agents.ddpg import critic_rnn_network
  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 network
  from tf_agents.networks import utils
  from tf_agents.specs import distribution_spec
  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 nest_utils
  from tf_agents.utils import test_utils
label_desc: Use image node_id 2 for calling the DummyActorNet obj's underlying member method code with example usage: obj._get_normal_distribution_spec(sample_spec) and returns: distribution_spec, tfp, tfp