def METHOD_NAME(self, data=None):
    if data is None:
        cmd = 'nmcli -t -f DEVICE,STATE d'
        data = sp.check_output(cmd, shell=True).decode(
            sys.stdout.encoding, errors='ignore')
    for line in data.splitlines():
        dev, state = line.strip().rsplit(':', maxsplit=1)
        self.devices[dev] = state