<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def render_policy_template( # pylint: disable=too-many-arguments account_number='', app='coreforrest', env='dev', group='forrest', items=None, pipeline_settings=None, region='us-east-1', service=''):
 """Render IAM Policy template. To support multiple statement blocks, JSON objects can be separated by a comma. This function attempts to turn any invalid JSON into a valid list based on this comma separated assumption. Args: account_number (str):
 AWS Account number. app (str):
 Name of Spinnaker Application. env (str):
 Environment/Account in AWS group (str):
A Application group/namespace items (list):
 Resource names used to create a Policy per Resource. region (str):
 AWS region. pipeline_settings (dict):
 Settings from *pipeline.json*. service (str):
 Name of cloud service to find matching IAM Policy template. Returns: list: IAM Policy :obj:`dict` statements for the given service. """

    statements = []

    rendered_service_policy = get_template(
        'infrastructure/iam/{0}.json.j2'.format(service),
        account_number=account_number,
        app=app,
        env=env,
        group=group,
        region=region,
        items=items,
        settings=pipeline_settings)

    try:
        statement_block = json.loads(rendered_service_policy)
        statements.append(statement_block)
    except ValueError:
        LOG.debug('Need to make %s template into list.', service)
        statements = json.loads('[{0}]'.format(rendered_service_policy))

    LOG.debug('Rendered IAM Policy statements: %s', statements)

    return statements