<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hwpack_names():
 """return installed hardware package names."""

    ls = hwpack_dir().listdir()
    ls = [x.name for x in ls]
    ls = [x for x in ls if x != 'tools']
    arduino_included = 'arduino' in ls
    ls = [x for x in ls if x != 'arduino']
    ls.sort()
    if arduino_included:
        ls = ['arduino'] + ls  # move to 1st pos
    return ls