"input" is 1D. "offsets" determines the starting index
           position of each bag (sequence) in "input".
     * **per_sample_weights** (*Tensor**, **optional*) -- a tensor
       of float / double weights, or None to indicate all weights
       should be taken to be "1". If specified,
       "per_sample_weights" must have exactly the same shape as
       input and is treated as having the same "offsets", if those
       are not "None". Only supported for "mode='sum'".

  Returns:
     Tensor output shape of *(B, embedding_dim)*.

  Return type:
     *Tensor*

  Note:

    A few notes about "input" and "offsets":

    * "input" and "offsets" have to be of the same type, either
      int or long

    * If "input" is 2D of shape *(B, N)*, it will be treated as
      "B" bags (sequences) each of fixed length "N", and this will
      return "B" values aggregated in a way depending on the
