def get_tensors_maybe_in_tower(self, names):
        """
        Get tensors in the graph with the given names.
        Will automatically check for the *first training tower*
        if no existing tensor is found with the name.

        Returns:
            [tf.Tensor]
        """
        from ..train.tower import TowerTrainer  # noqa

        def get_tensor(name):
            msg = "Tensor {} not found in the graph!".format(name)
            try:
                return get_op_or_tensor_by_name(name)
            except KeyError:
                pass
            if not isinstance(self.trainer, TowerTrainer):
                raise KeyError(msg)
            towers = self.trainer.towers
            try:
                return towers.training()[0][name]
            except KeyError:
                raise KeyError(msg)
        return [get_tensor(name) for name in names]

        Get tensors in the graph with the given names.
        Will automatically check for the *first training tower*
        if no existing tensor is found with the name.

        Returns:
            [tf.Tensor]
        
tensorpack/callbacks/base.py