def __getitem__(self, name_or_index):
        """
        Args:
            name_or_index (str or int):

        Returns:
            a :class:`TowerTensorHandle`.
        """
        if isinstance(name_or_index, int):
            return self._handles[name_or_index]
        return self._name_to_handle[name_or_index]

        Args:
            name_or_index (str or int):

        Returns:
            a :class:`TowerTensorHandle`.
        
tensorpack/tfutils/tower.py