class_docstr: Base class for cells wrappers V2 compatibility.
  
  This class along with `rnn_cell_impl._RNNCellWrapperV1` allows to define
  wrappers that are compatible with V1 and V2, and defines helper methods for
  this purpose.
class_docstr_tok: ["Base","class","for","cells","wrappers","V2","compatibility",".","This","class","along","with","`","rnn_cell_impl._RNNCellWrapperV1","`","allows","to","define","wrappers","that","are","compatible","with","V1","and","V2",",","and","defines","helper","methods","for","this","purpose","."]
code: def __init__(self, cell, *args, **kwargs):
      super(_RNNCellWrapperV2, self).__init__(*args, **kwargs)
      self.cell = cell
      cell_call_spec = tf_inspect.getfullargspec(cell.call)
      self._expects_training_arg = (
          "training" in cell_call_spec.args
      ) or (cell_call_spec.varkw is not None)
  
imports: from tensorflow.python.keras.layers import recurrent
  from tensorflow.python.keras.layers.legacy_rnn import rnn_cell_wrapper_impl
  from tensorflow.python.keras.utils import tf_inspect
  from tensorflow.python.util.deprecation import deprecated
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new _RNNCellWrapperV2 object from inherited base classes: recurrent with example: obj = _RNNCellWrapperV2(cell)