class_docstr: Priority Sort task from the Neural Turing Machines paper:
      http://arxiv.org/abs/1410.5401.
  
  See Also:
      See comments on :py:class:`~neon.data.ticker.CopyTask` class for more details.
docstr: Create a new minibatch of ticker priority sort task data.
  
  Arguments:
      in_tensor: device buffer holding inputs
      out_tensor: device buffer holding outputs
      mask: device buffer for the output mask
docstr_tok: ["Create","a","new","minibatch","of","ticker","priority","sort","task","data",".","Arguments",":","in_tensor",":","device","buffer","holding","inputs","out_tensor",":","device","buffer","holding","outputs","mask",":","device","buffer","for","the","output","mask"]
code: def synthesize(self, in_tensor, out_tensor, mask):
      """
      Create a new minibatch of ticker priority sort task data.
  
      Arguments:
          in_tensor: device buffer holding inputs
          out_tensor: device buffer holding outputs
          mask: device buffer for the output mask
      """
  
      # All sequences in a minibatch are the same length for convenience
      seq_len = np.random.randint(1, self.seq_len_max + 1)
      time_steps = self.time_steps_func(seq_len)
  
      # Get the minibatch specific numpy buffers
      inputs, outputs = super(PrioritySortTask, self).fetch_io(
          time_steps
      )
  
      # Set the start bit
      inputs[-3, : self.be.bsz] = 1
  
      # Generate the sequence to be copied
      seq = np.random.randint(
          2, size=(self.nin, seq_len * self.be.bsz)
      ).astype(float)
  
      # Zero out the start, stop, and priority channels
      seq[-3:, :] = 0
  
      # Generate the scalar priorities and put them in seq
      priorities = np.random.uniform(
          -1, 1, size=(seq_len * self.be.bsz,)
      )
      seq[-1, :] = priorities
  
      # Set the stop bit
      stop_loc = self.be.bsz * (seq_len + 1)
      inputs[-2, stop_loc : stop_loc + self.be.bsz] = 1
  
      # Place the actual sequence to copy in inputs
      inputs[:, self.be.bsz : stop_loc] = seq
  
      # sort the sequences
      for i in range(self.be.bsz):
          # for every sequence in the batch
  
          # x <- every column in the sequence
          x = seq[:, i :: self.be.bsz]
  
          # sort that set of columns by elt in the last row (the priority)
          x = x[:, x[-1, :].argsort()]
  
          # put those columns back into minibatch in the right places
          seq[:, i :: self.be.bsz] = x
  
      outputs[:, self.be.bsz * (seq_len + 2) :] = seq[: self.nout, :]
  
      # Fill the device minibatch buffers
      super(PrioritySortTask, self).fill_buffers(
          time_steps, inputs, outputs, in_tensor, out_tensor, mask
      )
  
imports: import numpy
  from neon import NervanaObject
label_desc: Use image node_id 2 for calling the PrioritySortTask obj's underlying member method code with example usage: obj.synthesize(in_tensor, out_tensor, mask) without return types