new_contents: from blocks.bricks import Initializable, Linear
  from blocks.bricks.base import lazy, application
  from blocks.bricks.parallel import Fork
  from blocks.utils import dict_union
  
  class RecurrentWithFork(Initializable):
  
      @lazy(allocation=['input_dim'])
      def __init__(self, recurrent, input_dim, **kwargs):
          super(RecurrentWithFork, self).__init__(**kwargs)
          self.recurrent = recurrent
          self.input_dim = input_dim
          self.fork = Fork(
              [name for name in self.recurrent.sequences
               if name != 'mask'],
               prototype=Linear())
          self.children = [recurrent.brick, self.fork]
  
      def _push_allocation_config(self):
          self.fork.input_dim = self.input_dim
          self.fork.output_dims = [self.recurrent.brick.get_dim(name)
                                   for name in self.fork.output_names]
  
      @application(inputs=['input_', 'mask'])
      def apply(self, input_, mask=None, **kwargs):
          return self.recurrent(
              mask=mask, **dict_union(self.fork.apply(input_, as_dict=True),
                                      kwargs))
  
      @apply.property('outputs')
      def apply_outputs(self):
          return self.recurrent.states
  
subject: Add bricks.py