<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_checks(self, tmpl=TMPL, _items=None, **kwargs):
 """Render the field as a series of checkboxes, using the `tmpl` parameter as the template for each item. :param tmpl: HTML template to use for rendering each item. :param **kwargs: Named paremeters used to generate the HTML attributes of each item. It follows the same rules as `get_html_attrs` """

        attrs = self.extra.copy()
        attrs.update(kwargs)
        attrs['type'] = 'checkbox'
        attrs['name'] = self.name
        html = []
        tmpl = to_unicode(tmpl)
        values = self.to_string(**attrs) or []
        items = _items or self.items

        for item in items:
            if isinstance(item, list):
                html.extend(self._render_fieldset(item, attrs, values, tmpl))
            else:
                html.append(self._render_item(item, attrs, values, tmpl))
        return Markup('\n'.join(html))