class_docstr: A distributed version of SparseDispatcher.
  
  Instead of one batch of input examples, we simultaneously process
  a list of num_datashards batches of input examples.  The per-expert
  `Tensor`s contain a combination of examples from the different datashards.
  
  Each datashard is associated with a particular device and each expert is
  associated with a particular device.  All per-datashard and per-expert
  `Tensor`s are created on those devices.  There is no single-device bottleneck.
class_docstr_tok: ["A","distributed","version","of","SparseDispatcher",".","Instead","of","one","batch","of","input","examples",",","we","simultaneously","process","a","list","of","num_datashards","batches","of","input","examples",".","The","per-expert","`","Tensor","`","s","contain","a","combination","of","examples","from","the","different","datashards",".","Each","datashard","is","associated","with","a","particular","device","and","each","expert","is","associated","with","a","particular","device",".","All","per-datashard","and","per-expert","`","Tensor","`","s","are","created","on","those","devices",".","There","is","no","single-device","bottleneck","."]
docstr: Gate values corresponding to the examples in the per-expert `Tensor`s.
  
  Returns:
    a list of `num_experts` one-dimensional `Tensor`s of type `tf.float32`.
docstr_tok: ["Gate","values","corresponding","to","the","examples","in","the","per-expert","`","Tensor","`","s",".","Returns",":","a","list","of","`","num_experts","`","one-dimensional","`","Tensor","`","s","of","type","`","tf.float32","`","."]
code: def expert_to_gates(self):
      """Gate values corresponding to the examples in the per-expert `Tensor`s.
  
      Returns:
        a list of `num_experts` one-dimensional `Tensor`s of type `tf.float32`.
      """
      return self._ep(
          tf.concat,
          transpose_list_of_lists(
              self._dp(lambda d: d.expert_to_gates(), self._dispatchers)
          ),
          0,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import math
  import six
  from six.moves import range
  from six.moves import zip
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers.vq_discrete import DiscreteBottleneck
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the DistributedSparseDispatcher obj's underlying member method code with example usage: obj.expert_to_gates() and returns: self