code: def get_optimizer(
      model: Optional[keras.layers.Layer] = None, lr: float = 1e-3
  ) -> keras.optimizers.Optimizer:
      """
      Constructs default `Adam` optimizer.
  
      Parameters
      ----------
      model
          Model to get the optimizer for. Not required for `tensorflow` backend.
      lr
          Learning rate.
  
      Returns
      -------
      Default optimizer.
      """
      return keras.optimizers.Adam(learning_rate=lr)
  
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 1 for calling a global function with example usage: get_optimizer(model, lr) and returns: keras