code: def _get_attention_module(name: str, is_self_attention=True) -> Any:
      """Returns an attention module."""
      function_name = AttentionFunctionName(name)
      if function_name == AttentionFunctionName.STANDARD:
          return attention_layers.MultiHeadAttention
      elif function_name == AttentionFunctionName.LINFORMER:
          if not is_self_attention:
              raise NotImplementedError
          else:
              return LinformerEncoderAttention
      elif function_name == AttentionFunctionName.PERFORMER:
          return PerformerEncoderAttention
  
imports: import abc
  import enum
  import functools
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Iterable
  from absl import logging
  from flax import linen
  import jax
  from jax import lax
  from jax import random
  import jax.numpy
  import numpy
  from scenic.model_lib.layers import attention_layers
label_desc: Use image node_id 1 for calling a global function with example usage: _get_attention_module(name, is__attention) and returns: attention_layers, LinformerEncoderAttention, PerformerEncoderAttention