def _transform_function()

in rostran/providers/cloudformation/template.py [0:0]


    def _transform_function(self, func_name, func_value, rule_props) -> dict:
        if rule_props.get("Ignore") or not rule_props.get("To"):
            typer.secho(
                f"  Function {func_name!r} is not supported and will be ignored.",
                fg="yellow",
            )
            return {func_name: func_value}

        final_func_name = rule_props["To"]
        final_func_value, _ = self._transform_value(func_value)
        if final_func_name == "Fn::Sub":
            if isinstance(final_func_value, str):
                final_func_value = self._transform_sub_pseudo(final_func_value)
            elif (
                isinstance(final_func_value, list)
                and len(final_func_value) >= 1
                and isinstance(final_func_value[0], str)
            ):
                final_func_value[0] = self._transform_sub_pseudo(final_func_value[0])

        handler_name = rule_props.get("Handler")
        if handler_name is not None:
            handler_func = getattr(basic_handler_module, handler_name)
            final_func_value = handler_func(final_func_value, False)

        return {final_func_name: final_func_value}