<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lib_examples(lib):
 """return library examples. EXAMPLE1,EXAMPLE2,.. """

    d = lib_examples_dir(lib)
    if not d.exists():
        return []
    ls = d.dirs()
    ls = [x.name for x in ls]
    ls.sort()
    return ls