<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_comment(self, node, elem, minel):
 """Add list annotation to `elem`."""

        lo = "0" if minel is None else minel.arg
        maxel = node.search_one("max-elements")
        hi = "" if maxel is None else maxel.arg
        elem.insert(0, etree.Comment(
            " # entries: %s..%s " % (lo, hi)))
        if node.keyword == 'list':
            elem.insert(0, etree.Comment(
                " # keys: " + ",".join([k.arg for k in node.i_key])))