class_docstr: For :class:`Registrable` we need to have a ``Type[Seq2VecEncoder]`` as the value registered for each
  key.  What that means is that we need to be able to ``__call__`` these values (as is done with
  ``__init__`` on the class), and be able to call ``from_params()`` on the value.
  
  In order to accomplish this, we have two options: (1) we create a ``Seq2VecEncoder`` class for
  all of pytorch's RNN modules individually, with our own parallel classes that we register in
  the registry; or (2) we wrap pytorch's RNNs with something that `mimics` the required
  API.  We've gone with the second option here.
  
  This is a two-step approach: first, we have the :class:`PytorchSeq2VecWrapper` class that handles
  the interface between a pytorch RNN and our ``Seq2VecEncoder`` API.  Our ``PytorchSeq2VecWrapper``
  takes an instantiated pytorch RNN and just does some interface changes.  Second, we need a way
  to create one of these ``PytorchSeq2VecWrappers``, with an instantiated pytorch RNN, from the
  registry.  That's what this ``_Wrapper`` does.  The only thing this class does is instantiate
  the pytorch RNN in a way that's compatible with ``Registrable``, then pass it off to the
  ``PytorchSeq2VecWrapper`` class.
  
  When you instantiate a ``_Wrapper`` object, you give it an ``RNNBase`` subclass, which we save
  to ``self``.  Then when called (as if we were instantiating an actual encoder with
  ``Encoder(**params)``, or with ``Encoder.from_params(params)``), we pass those parameters
  through to the ``RNNBase`` constructor, then pass the instantiated pytorch RNN to the
  ``PytorchSeq2VecWrapper``.  This lets us use this class in the registry and have everything just
  work.
code: def __init__(self, module_class):
      self._module_class = module_class
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/seq2vec_encoders/__init__.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.modules.seq2vec_encoders.cnn_encoder import CnnEncoder
  from allennlp.modules.seq2vec_encoders.boe_encoder import BagOfEmbeddingsEncoder
  from allennlp.modules.seq2vec_encoders.pytorch_seq2vec_wrapper import PytorchSeq2VecWrapper
  from allennlp.modules.seq2vec_encoders.seq2vec_encoder import Seq2VecEncoder
  from allennlp.modules.augmented_lstm import AugmentedLstm
  from allennlp.modules.stacked_alternating_lstm import StackedAlternatingLstm
label_desc: Use image node_id 1 to create a new _Seq2VecWrapper object from inherited base classes: object with example: obj = _Seq2VecWrapper(module_class)