<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def listFieldsFromSource(self, template_source):
 """List all the attributes to be rendered directly from template source :param template_source: the template source (usually represents the template content in string format) :return: a :class:`set` contains all the needed attributes :rtype: set """


        ast = self.environment.parse(template_source)
        return jinja2.meta.find_undeclared_variables(ast)