def get_virtual_hosts(self):
        # Search base config, and all included paths for VirtualHosts
        vhs = []
        vhost_paths = {}
        for vhost_path in self.parser.parser_paths.keys():
            paths = self.aug.match(
                ("/files%s//*[label()=~regexp('%s')]" %
                    (vhost_path, parser.case_i("VirtualHost"))))
            paths = [path for path in paths if
                     os.path.basename(path) == "VirtualHost"]
            for path in paths:
                new_vhost = self._create_vhost(path)
                realpath = os.path.realpath(new_vhost.filep)
                if realpath not in vhost_paths.keys():
                    vhs.append(new_vhost)
                    vhost_paths[realpath] = new_vhost.filep
                elif realpath == new_vhost.filep:
                    # Prefer "real" vhost paths instead of symlinked ones
                    # ex: sites-enabled/vh.conf -> sites-available/vh.conf

                    # remove old (most likely) symlinked one
                    vhs = [v for v in vhs if v.filep != vhost_paths[realpath]]
                    vhs.append(new_vhost)
                    vhost_paths[realpath] = realpath

        return vhs
Returns the index name.
dataset/ETHPy150Open letsencrypt/letsencrypt/certbot-apache/certbot_apache/configurator.py/ApacheConfigurator.get_virtual_hosts--crossover with--dataset/ETHPy150Open espeed/bulbs/bulbs/base/client.py/Result.get_index_name