<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_devicelist(data_str):
 """Parse the BT Home Hub 5 data format."""


    p = HTMLTableParser()
    p.feed(data_str)

    known_devices = p.tables[9]

    devices = {}

    for device in known_devices:
        if len(device) == 5 and device[2] != '':
            devices[device[2]] = device[1]

    return devices