code: def build_attention(
      attention_type, decoder_hidden_state_dim, context_dim, **kwargs
  ):
      return ATTENTION_REGISTRY[attention_type](
          decoder_hidden_state_dim, context_dim, **kwargs
      )
  
imports: import importlib
  import os
  from pytorch_translate.attention.base_attention import BaseAttention
label_desc: Use image node_id 1 for calling a global function with example usage: build_attention(attention_type, decoder_hidden_state_dim, context_dim) and returns: ATTENTION_REGISTRY