def check_bounds_variables(self, dataset):
recommended_ctx = TestCtx(BaseCheck.MEDIUM, '<STR_LIT>')<EOL>bounds_map = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>}<EOL>bounds_variables = [v.bounds for v in dataset.get_variables_by_attributes(bounds=lambda x: x is not None)]<EOL>for variable in bounds_variables:<EOL><INDENT>ncvar = dataset.variables.get(variable, {})<EOL>recommended_ctx.assert_true(ncvar != {}, '<STR_LIT>'.format(variable))<EOL>if ncvar == {}:<EOL><INDENT>continue<EOL><DEDENT>units = getattr(ncvar, '<STR_LIT>', '<STR_LIT>')<EOL>if variable in bounds_map and '<STR_LIT>' in bounds_map[variable]:<EOL><INDENT>recommended_ctx.assert_true(<EOL>units == bounds_map[variable]['<STR_LIT>'],<EOL>'<STR_LIT>'.format(variable, bounds_map[variable]['<STR_LIT>'])<EOL>)<EOL><DEDENT>else:<EOL><INDENT>recommended_ctx.assert_true(<EOL>units != '<STR_LIT>',<EOL>'<STR_LIT>'.format(variable)<EOL>)<EOL><DEDENT>comment = getattr(ncvar, '<STR_LIT>', '<STR_LIT>')<EOL>recommended_ctx.assert_true(<EOL>comment != '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>return recommended_ctx.to_result()<EOL>
Checks the grid boundary variables.

:param netCDF4.Dataset dataset: An open netCDF dataset