code: def concat_hyper_prompts_kv(
      k,
      v,
      scope_encoder_or_decoder,
      use_hyperprompt,
      memory_length,
      task_num,
      num_heads,
      prefix_hidden_dim,
      kv_dim,
      context,
      mtlprompt_share,
      dropout_rate,
      prompt_length,
  ):
      """Performs the concatenation of hyper prompts to key and value."""
      # Inject hyper-prompts into keys and values.
      if use_hyperprompt:
          # HyperPrompt mode.
          prompts_batch_k, prompts_batch_v = make_params_hyperprompt(
              task_num,
              num_heads,
              prefix_hidden_dim,
              kv_dim,
              context,
              mtlprompt_share,
              dropout_rate,
              prompt_length=prompt_length,
              scope=scope_encoder_or_decoder,
          )
      else:
          # MTL-Prompt mode.
          prompts_batch_k, prompts_batch_v = make_params_mtlprompt(
              task_num,
              num_heads,
              prefix_hidden_dim,
              kv_dim,
              context,
              mtlprompt_share,
              dropout_rate,
              prompt_length=prompt_length,
          )
  
      k = mtf.concat(
          [prompts_batch_k, k], concat_dim_name="memory_length"
      )
      v = mtf.concat(
          [prompts_batch_v, v], concat_dim_name="memory_length"
      )
      memory_length = mtf.Dimension(
          "memory_length", memory_length.size + prompt_length
      )
      memory_position = mtf.range(context.mesh, memory_length, tf.int32)
  
      return k, v, memory_position, memory_length
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import mesh_tensorflow
  import tensorflow.compat.v1
label_desc: Use image node_id 11 for calling a global function with example usage: concat_hyper_prompts_kv(k, v, scope_encoder_or_decoder, use_hyperprompt, memory_length, task_num, num_heads, prefix_hidden_dim, kv_dim, context, mtlprompt_share, dropout_rate, prompt_length) and returns: k,  v,  memory_position,  memory_length