def get_instrument_variables(ds):
candidates = []<EOL>for variable in ds.variables:<EOL><INDENT>instrument = getattr(ds.variables[variable], '<STR_LIT>', '<STR_LIT>')<EOL>if instrument and instrument in ds.variables:<EOL><INDENT>if instrument not in candidates:<EOL><INDENT>candidates.append(instrument)<EOL><DEDENT><DEDENT><DEDENT>instrument = getattr(ds, '<STR_LIT>', '<STR_LIT>')<EOL>if instrument and instrument in ds.variables:<EOL><INDENT>if instrument not in candidates:<EOL><INDENT>candidates.append(instrument)<EOL><DEDENT><DEDENT>return candidates<EOL>
Returns a list of instrument variables

:param netCDF4.Dataset ds: An open netCDF4 Dataset