<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_contents_dir(node):
 """Return content signatures and names of all our children separated by new-lines. Ensure that the nodes are sorted."""

    contents = []
    for n in sorted(node.children(), key=lambda t: t.name):
        contents.append('%s %s\n' % (n.get_csig(), n.name))
    return ''.join(contents)