def substitute(self, data={}, **kwargs):
        def convert(mo):
            key = mo.group('id')
            val = kwargs[key] if key in kwargs else data[key]
            return six.text_type(val)
        return self.pattern.sub(convert, self.template)
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/network_manager/template.py/BaseTemplate.substitute/original