def process(self, text, context=None, template_dir=None, **kwargs):
        def render(matchobj):
            try:
                text = matchobj.group(1)
                name, value, inline_kwargs = parse_inline(text)
                try:
                    cls = self._registry[name]
                except KeyError:
                    raise InlineNotRegisteredError('"%s" was not found as a registered inline' % name)
                inline = cls(value, context=context, template_dir=template_dir, **inline_kwargs)
                return str(inline.render())
            # Silence any InlineUnrenderableErrors unless INLINE_DEBUG is True
            except InlineUnrenderableError:
                debug = getattr(settings, "INLINE_DEBUG", False)
                if debug:
                    raise
                else:
                    return ""
        text = self.inline_finder.sub(render, text)
        return text


# The default registry.
dataset/ETHPy150Open mintchaos/django_inlines/django_inlines/inlines.py/Registry.process/original