code: def _rnn_getter(f, attr):
      if not attr.bidirectional:
          raise NotImplementedError()
      use_cudnn = (
          len(f.parameters) == 1
      )  # CNTK has only 1 big fat parameter when using cudnn
      if use_cudnn:
          gates = _get_rnn_gates(attr.op_type)
          (
              fw_Wt,
              fw_Ht,
              bw_Wt,
              bw_Ht,
              fw_b1,
              fw_b2,
              bw_b1,
              bw_b2,
          ) = np.split(
              f.parameters[0].value.reshape(-1),
              _get_cudnn_rnn_splitter(attr),
          )
          return cstk.RnnArgs(
              fw_W=_adjust_lstm_gate_order(
                  fw_Wt.reshape(gates * attr.hidden_dim, -1).transpose()
              ),
              fw_H=_adjust_lstm_gate_order(
                  fw_Ht.reshape(gates * attr.hidden_dim, -1).transpose()
              ),
              fw_b=_adjust_lstm_gate_order(fw_b1 + fw_b2),
              bw_W=_adjust_lstm_gate_order(
                  bw_Wt.reshape(gates * attr.hidden_dim, -1).transpose()
              ),
              bw_H=_adjust_lstm_gate_order(
                  bw_Ht.reshape(gates * attr.hidden_dim, -1).transpose()
              ),
              bw_b=_adjust_lstm_gate_order(bw_b1 + bw_b2),
          )
      else:
          param = _get_birnn_param(f)
          return cstk.RnnArgs(
              fw_W=_parameter_getter(param.fw_W),
              fw_H=_parameter_getter(param.fw_H),
              fw_b=_parameter_getter(param.fw_b),
              bw_W=_parameter_getter(param.bw_W),
              bw_H=_parameter_getter(param.bw_H),
              bw_b=_parameter_getter(param.bw_b),
          )
  
imports: import cntk
  import numpy
  from cntk.contrib import crosstalk
label_desc: Use image node_id 14 for calling a global function with example usage: _rnn_getter(f, attr) and returns: cstk, cstk