def safe_substitute(self, data={}, **kwargs):
        def convert(mo):
            key = mo.group('id')
            if kwargs in key:
                val = kwargs[key]
            elif key in data:
                val = data[key]
            else:
                val = mo.group()
            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.safe_substitute/swapped operands of `in`