def get_crs_variable(ds):
for var in ds.variables:<EOL><INDENT>grid_mapping = getattr(ds.variables[var], '<STR_LIT>', '<STR_LIT>')<EOL>if grid_mapping and grid_mapping in ds.variables:<EOL><INDENT>return grid_mapping<EOL><DEDENT><DEDENT>return None<EOL>
Returns the name of the variable identified by a grid_mapping attribute

:param netCDF4.Dataset ds: An open netCDF4 Dataset