code: def _check_if_diag_gaussian(action_distribution_cls, framework):
      if framework == "torch":
          from ray.rllib.models.torch.torch_distributions import (
              TorchDiagGaussian,
          )
  
          assert issubclass(
              action_distribution_cls, TorchDiagGaussian
          ), (
              f"free_log_std is only supported for DiagGaussian action distributions. "
              f"Found action distribution: {action_distribution_cls}."
          )
      elif framework == "tf2":
          from ray.rllib.models.tf.tf_distributions import (
              TfDiagGaussian,
          )
  
          assert issubclass(action_distribution_cls, TfDiagGaussian), (
              "free_log_std is only supported for DiagGaussian action distributions. "
              "Found action distribution: {}.".format(
                  action_distribution_cls
              )
          )
      else:
          raise ValueError(
              f"Framework {framework} not supported for free_log_std."
          )
  
file_path: ray/python/ray/rllib/algorithms/ppo/ppo_catalog.py
imports: import gymnasium
  from ray.rllib.core.models.catalog import Catalog
  from ray.rllib.core.models.configs import ActorCriticEncoderConfig, MLPHeadConfig, FreeLogStdMLPHeadConfig
  from ray.rllib.core.models.base import Encoder, ActorCriticEncoder, Model
  from ray.rllib.utils import override
  from ray.rllib.utils.annotations import OverrideToImplementCustomLogic
label_desc: Use image node_id 1 for calling a global function with example usage: _check_if_diag_gaussian(action_distribution_cls, framework) without return types