code: def get_initializer(name, framework="tf"):
      """Returns a framework specific initializer, given a name string.
  
      Args:
          name: One of "xavier_uniform" (default), "xavier_normal".
          framework: One of "jax", "tf|tf2" or "torch".
  
      Returns:
          A framework-specific initializer function, e.g.
              tf.keras.initializers.GlorotUniform or
              torch.nn.init.xavier_uniform_.
  
      Raises:
          ValueError: If name is an unknown initializer.
      """
      # Already a callable, return as-is.
      if callable(name):
          return name
  
      if framework == "jax":
          _, flax = try_import_jax()
          assert (
              flax is not None
          ), "`flax` not installed. Try `pip install jax flax`."
          import flax.linen as nn
  
          if name in [None, "default", "xavier_uniform"]:
              return nn.initializers.xavier_uniform()
          elif name == "xavier_normal":
              return nn.initializers.xavier_normal()
      if framework == "torch":
          _, nn = try_import_torch()
          assert (
              nn is not None
          ), "`torch` not installed. Try `pip install torch`."
          if name in [None, "default", "xavier_uniform"]:
              return nn.init.xavier_uniform_
          elif name == "xavier_normal":
              return nn.init.xavier_normal_
      else:
          assert framework in [
              "tf",
              "tf2",
          ], "Unsupported framework `{}`!".format(framework)
          tf1, tf, tfv = try_import_tf()
          assert (
              tf is not None
          ), "`tensorflow` not installed. Try `pip install tensorflow`."
          if name in [None, "default", "xavier_uniform"]:
              return tf.keras.initializers.GlorotUniform
          elif name == "xavier_normal":
              return tf.keras.initializers.GlorotNormal
  
      raise ValueError(
          "Unknown activation ({}) for framework={}!".format(
              name, framework
          )
      )
  
file_path: ray/rllib/models/utils.py
imports: from typing import Callable, Optional, Union
  from ray.rllib.core.models.specs.specs_base import TensorSpec
  from ray.rllib.core.models.specs.specs_dict import SpecDict
  from ray.rllib.utils.annotations import DeveloperAPI
  from ray.rllib.utils.framework import try_import_jax, try_import_tf, try_import_torch
label_desc: Use image node_id 5 for calling a global function with example usage: get_initializer(name, framework) and returns: name, nn, nn, tf, nn, nn, tf