code: def _build_embedding_encoder(
      self,
      graph_name,
      embedding_style,
      vocab_model,
      emb_input_size,
      emb_hidden_size,
      emb_rnn_dropout,
      emb_word_dropout,
      # dynamic parameters
      emb_sim_metric_type=None,
      emb_num_heads=None,
      emb_top_k_neigh=None,
      emb_epsilon_neigh=None,
      emb_smoothness_ratio=None,
      emb_connectivity_ratio=None,
      emb_sparsity_ratio=None,
      emb_alpha_fusion=None,
      emb_fix_word_emb=False,
      emb_fix_bert_emb=False,
      **kwargs,
  ):
      if not isinstance(graph_name, str):
          raise ValueError("graph_name parameter should be str")
  
      self.graph_initializer = GraphEmbeddingInitialization(
          word_vocab=vocab_model.in_word_vocab,
          embedding_style=embedding_style,
          hidden_size=emb_hidden_size,
          word_dropout=emb_word_dropout,
          rnn_dropout=emb_rnn_dropout,
          fix_word_emb=emb_fix_word_emb,
          fix_bert_emb=emb_fix_bert_emb,
      )
  
      if graph_name == "node_emb":
          self.graph_topology = NodeEmbeddingBasedGraphConstruction(
              sim_metric_type=emb_sim_metric_type,
              num_heads=emb_num_heads,
              top_k_neigh=emb_top_k_neigh,
              epsilon_neigh=emb_epsilon_neigh,
              smoothness_ratio=emb_smoothness_ratio,
              connectivity_ratio=emb_connectivity_ratio,
              sparsity_ratio=emb_sparsity_ratio,
              input_size=emb_input_size,
              hidden_size=emb_hidden_size,
          )
      elif graph_name == "node_emb_refined":
          self.graph_topology = (
              NodeEmbeddingBasedRefinedGraphConstruction(
                  emb_alpha_fusion,
                  sim_metric_type=emb_sim_metric_type,
                  num_heads=emb_num_heads,
                  top_k_neigh=emb_top_k_neigh,
                  epsilon_neigh=emb_epsilon_neigh,
                  smoothness_ratio=emb_smoothness_ratio,
                  connectivity_ratio=emb_connectivity_ratio,
                  sparsity_ratio=emb_sparsity_ratio,
                  input_size=emb_input_size,
                  hidden_size=emb_hidden_size,
              )
          )
  
      self.enc_word_emb = (
          self.graph_initializer.embedding_layer.word_emb_layers["w2v"]
          if "w2v"
          in self.graph_initializer.embedding_layer.word_emb_layers
          else None
      )
      self.graph_name = graph_name
  
imports: import abc
  import os
  import torch
  import torch.nn
  import torch.nn.functional
  from graph4nlp.pytorch.modules.graph_construction.node_embedding_based_graph_construction import NodeEmbeddingBasedGraphConstruction
  from graph4nlp.pytorch.modules.graph_construction.node_embedding_based_refined_graph_construction import NodeEmbeddingBasedRefinedGraphConstruction
  from graph4nlp.pytorch.modules.graph_embedding_initialization.graph_embedding_initialization import GraphEmbeddingInitialization
  from graph4nlp.pytorch.modules.graph_embedding_learning.gat import GAT
  from graph4nlp.pytorch.modules.graph_embedding_learning.gcn import GCN
  from graph4nlp.pytorch.modules.graph_embedding_learning.ggnn import GGNN
  from graph4nlp.pytorch.modules.graph_embedding_learning.graphsage import GraphSAGE
label_desc: Use image node_id 2 for calling the Graph2XBase obj's underlying member method code with example usage: obj._build_embedding_encoder(graph_name, embedding_style, vocab_model, emb_input_size, emb_hidden_size, emb_rnn_dropout, emb_word_dropout, emb_sim_metric_type, emb_num_heads, emb_top_k_neigh, emb_epsilon_neigh, emb_smoothness_ratio, emb_connectivity_ratio, emb_sparsity_ratio, emb_alpha_fusion, emb_fix_word_emb, emb_fix_bert_emb) without return types