code: def get_actor(hidden_dim: int, output_dim: int) -> keras.layers.Layer:
      """
      Constructs the actor network.
  
      Parameters
      ----------
      hidden_dim
          Actor's hidden dimension
      output_dim
          Actor's output dimension.
  
      Returns
      -------
      Actor network.
      """
      return Actor(hidden_dim=hidden_dim, output_dim=output_dim)
  
imports: import os
  import random
  from typing import Any, List, Dict, Callable, Union, Optional, TYPE_CHECKING
  import numpy
  import tensorflow
  import tensorflow.keras
  from alibi.explainers.backends.cfrl_base import CounterfactualRLDataset
  from alibi.models.tensorflow.actor_critic import Actor, Critic
label_desc: Use image node_id 2 for calling a global function with example usage: get_actor(hidden_dim, output_dim) and returns: Actor