def METHOD_NAME(ctx, switch_id, debug):
    url = "{}/wm/core/switch/{}/port-desc/json".format(ctx.fl_host, switch_id)
    result = requests.get(url)
    result.raise_for_status()
    if debug:
        print(result)
        print(result.json())
    result_data = result.json()
    if 'port_desc' in result_data:
        def get_status(sw):
            r = {'FL_PORT': 'PORT_UP',
                 'FL_LINK': 'LINK_UP'}
            if 'PORT_DOWN' in sw['config']:
                r['FL_PORT'] = 'PORT_DOWN'
            if 'LINK_DOWN' in sw['state']:
                r['FL_LINK'] = 'LINK_DOWN'
            return r
        return {int(x['port_number']): get_status(x) for x in
                result.json()['port_desc'] if x['port_number'].isdigit()}
    return []