<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def retrieve_template(self):
 """Sets the instance links with pipeline_configs and then renders template files Returns: jsondata: A json objects containing templates """

        links = self.retrieve_instance_links()
        self.log.debug('Links is \n%s', pformat(links))
        self.pipeline_config['instance_links'].update(links)
        jsondata = get_template(
            template_file='infrastructure/app_data.json.j2',
            appinfo=self.appinfo,
            pipeline_config=self.pipeline_config,
            formats=self.generated,
            run_as_user=DEFAULT_RUN_AS_USER)
        self.log.debug('jsondata is %s', pformat(jsondata))
        return jsondata