<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def marvcli_comment_list(datasets):
 """Lists comments for datasets. Output: setid comment_id date time author message """

    app = create_app()
    ids = parse_setids(datasets, dbids=True)
    comments = db.session.query(Comment)\
                         .options(db.joinedload(Comment.dataset))\
                         .filter(Comment.dataset_id.in_(ids))
    for comment in sorted(comments, key=lambda x: (x.dataset._setid, x.id)):
        print(comment.dataset.setid, comment.id,
              datetime.datetime.fromtimestamp(int(comment.time_added / 1000)),
              comment.author, repr(comment.text))