    def gen_function(self) -> str:
        """
        Generate function body

        Returns
        -------
        str
           The function body string
        """
        target = backend.target.Target.current()
        template_path = target.template_path()
        func_key = "{target}.{op}.gen_function".format(
            target=target.name(), op=self._attrs["op"]
        )
        func = registry.get(func_key)
        return func(
            self._attrs,
            template_path,
        )
Generate function body

Returns
-------
str
The function body string
python/aitemplate/compiler/ops/tensor/permute210.py