parameters: (self, device=None)
return_statement: return result
docstring: Returns the next element given a `device`, else returns all in a list.
docstring_summary: Returns the next element given a `device`, else returns all in a list.
docstring_tokens: Returns the next element given a device else returns all in a list .
function: def get_next(self, device=None):
      """Returns the next element given a `device`, else returns all in a list."""
      if device is not None:
        index = self._devices.index(device)
        return self._device_iterators[index].get_next()
  
      result = []
      for i, device in enumerate(self._devices):
        with ops.device(device):
          result.append(self._device_iterators[i].get_next())
      return result
function_tokens: def get_next ( self , device = None ) : if device is not None : index = self . _devices . index ( device ) return self . _device_iterators [ index ] . get_next ( ) result = [ ] for i , device in enumerate ( self . _devices ) : with ops . device ( device ) : result . append ( self . _device_iterators [ i ] . get_next ( ) ) return result