def call_status(*args, **kwargs):
 res = dict()
 devices = _get_lights()
 for dev_id in ((('id' not in kwargs) and sorted(devices.keys())) or _get_devices(kwargs)):
  res[dev_id] = {'on': devices[dev_id]['state']['on'], 'reachable': devices[dev_id]['state']['reachable']}
 return res

def call_status ( * args , ** kwargs ) : res = dict ( ) devices = _get_lights ( ) for dev_id in ( ( ( 'id' not in kwargs ) and sorted ( devices . keys ( ) ) ) or _get_devices ( kwargs ) ) : res [ dev_id ] = { 'on' : devices [ dev_id ] [ 'state' ] [ 'on' ] , 'reachable' : devices [ dev_id ] [ 'state' ] [ 'reachable' ] } return res
return the status of the lamps .