class_docstr:     The graph2seq model consists the following components: 1) node embedding 2) graph embedding 3) decoding. # noqa
      Since the full pipeline will consist all parameters, so we will add prefix to the original parameters
       in each component as follows (except the listed four parameters):
          1) emb_ + parameter_name (eg: ``emb_input_size``)
          2) gnn_ + parameter_name (eg: ``gnn_direction_option``)
          3) dec_ + parameter_name (eg: ``dec_max_decoder_step``)
      Considering neatness, we will only present the four hyper-parameters which don't meet regulations.
      Examples
      -------
      # Build a vocab model from scratch
      >>> "It is just a how-to-use example."
      >>> from graph4nlp.pytorch.modules.config import get_basic_args
      >>> opt = get_basic_args(graph_construction_name="node_emb", graph_embedding_name="gat", decoder_name="stdrnn")
      >>> graph2seq = Graph2Seq.from_args(opt=opt, vocab_model=vocab_model, device=torch.device("cuda:0"))
      >>> batch_graph = [GraphData() for _ in range(2)]
      >>> tgt_seq = torch.Tensor([[1, 2, 3], [4, 5, 6]])
      >>> seq_out, _, _ = graph2seq(batch_graph=batch_graph, tgt_seq=tgt_seq)
      >>> print(seq_out.shape) # [2, 6, 5] (assume the vocabulary size is 5 and max_decoder_step is 6)
  Parameters
  ----------
  vocab_model: VocabModel
      The vocabulary.
  graph_name: str
      The graph type. Excepted in ["dependency", "constituency", "node_emb", "node_emb_refined"].
  gnn: str
      The graph neural network's name. Expected in ["gcn", "gat", "graphsage", "ggnn"]
class_docstr_tok: ["The","graph2seq","model","consists","the","following","components",":","1",")","node","embedding","2",")","graph","embedding","3",")","decoding",".","#","noqa","Since","the","full","pipeline","will","consist","all","parameters",",","so","we","will","add","prefix","to","the","original","parameters","in","each","component","as","follows","(","except","the","listed","four","parameters",")",":","1",")","emb_","+","parameter_name","(","eg",":","``","emb_input_size","``",")","2",")","gnn_","+","parameter_name","(","eg",":","``","gnn_direction_option","``",")","3",")","dec_","+","parameter_name","(","eg",":","``","dec_max_decoder_step","``",")","Considering","neatness",",","we","will","only","present","the","four","hyper-parameters","which","do","n't","meet","regulations",".","Examples","--","--","--","-","#","Build","a","vocab","model","from","scratch",">",">",">","``","It","is","just","a","how-to-use","example",".","''",">",">",">","from","graph4nlp.pytorch.modules.config","import","get_basic_args",">",">",">","opt","=","get_basic_args","(","graph_construction_name=","''","node_emb","''",",","graph_embedding_name=","''","gat","''",",","decoder_name=","''","stdrnn","''",")",">",">",">","graph2seq","=","Graph2Seq.from_args","(","opt=opt",",","vocab_model=vocab_model",",","device=torch.device","(","``","cuda:0","''",")",")",">",">",">","batch_graph","=","[","GraphData","(",")","for","_","in","range","(","2",")","]",">",">",">","tgt_seq","=","torch.Tensor","(","[","[","1",",","2",",","3","]",",","[","4",",","5",",","6","]","]",")",">",">",">","seq_out",",","_",",","_","=","graph2seq","(","batch_graph=batch_graph",",","tgt_seq=tgt_seq",")",">",">",">","print","(","seq_out.shape",")","#","[","2",",","6",",","5","]","(","assume","the","vocabulary","size","is","5","and","max_decoder_step","is","6",")","Parameters","--","--","--","--","--","vocab_model",":","VocabModel","The","vocabulary",".","graph_name",":","str","The","graph","type",".","Excepted","in","[","``","dependency","''",",","``","constituency","''",",","``","node_emb","''",",","``","node_emb_refined","''","]",".","gnn",":","str","The","graph","neural","network","'s","name",".","Expected","in","[","``","gcn","''",",","``","gat","''",",","``","graphsage","''",",","``","ggnn","''","]"]
code: def _get_gnn_params(opt):
      args = opt["graph_embedding_args"]
      shared_args = copy.deepcopy(args["graph_embedding_share"])
      private_args = copy.deepcopy(args["graph_embedding_private"])
      if "activation" in private_args.keys():
          private_args["activation"] = (
              getattr(F, private_args["activation"])
              if private_args["activation"]
              else None
          )
      if "norm" in private_args.keys():
          private_args["norm"] = (
              getattr(F, private_args["norm"])
              if private_args["norm"]
              else None
          )
  
      gnn_shared_args = {
          "gnn_" + key: value for key, value in shared_args.items()
      }
      pri_shared_args = {
          "gnn_" + key: value for key, value in private_args.items()
      }
      ret = copy.deepcopy(dict(gnn_shared_args, **pri_shared_args))
      ret["gnn"] = opt["graph_embedding_name"]
      return ret
  
imports: import copy
  import torch.nn.functional
  from graph4nlp.pytorch.modules.graph_embedding_initialization.embedding_construction import WordEmbedding
  from graph4nlp.pytorch.modules.prediction.generation.decoder_strategy import DecoderStrategy
  from graph4nlp.pytorch.modules.prediction.generation.StdRNNDecoder import StdRNNDecoder
  from graph4nlp.pytorch.modules.utils.generic_utils import wordid2str
  from .base import Graph2XBase
label_desc: Use image node_id 11 for calling the Graph2Seq obj's underlying member method code with example usage: obj._get_gnn_params(opt) and returns: ret