def convert(self, template_name, parameter_values):
if not self.has(template_name):<EOL><INDENT>raise TemplateNotFoundException(template_name)<EOL><DEDENT>template = self.get(template_name)<EOL>return template.to_statement(parameter_values)<EOL>
Converts the given template to IAM-ready policy statement by substituting template parameters with the given
values.

:param template_name: Name of the template
:param parameter_values: Values for all parameters of the template
:return dict: Dictionary containing policy statement
:raises ValueError: If the given inputs don't represent valid template
:raises InsufficientParameterValues: If the parameter values don't have values for all required parameters