In solarwinds-information-service/custom-integration-swis.star it appears that assets_all is used without being defined in get_assets().
I'm inclined to define it as:
assets_all = []
but I'm not sure that is the best way.
I also thought about:
data = json_decode(response.body)
data_type = type(data)
if data_type == 'dict':
assets = data.get('results', [])
elif data_type == 'list':
assets = data
else:
print('unsupported response format from SWIS')
return []
return assets
But it much be much easier than I am making it.
Tagging @tdiderich as I think this is their code.