class_docstr: Reader class for SEVIRI L2 products in GRIB format.
docstr: Get a value from the GRIB message based on the key, return None if missing.
  
  Args:
      gid: The ID of the GRIB message.
      key: The key of the required attribute.
  
  Returns:
      The retrieved attribute or None if the key is missing.
docstr_tok: ["Get","a","value","from","the","GRIB","message","based","on","the","key",",","return","None","if","missing",".","Args",":","gid",":","The","ID","of","the","GRIB","message",".","key",":","The","key","of","the","required","attribute",".","Returns",":","The","retrieved","attribute","or","None","if","the","key","is","missing","."]
code: def _get_from_msg(gid, key):
      """Get a value from the GRIB message based on the key, return None if missing.
  
      Args:
          gid: The ID of the GRIB message.
          key: The key of the required attribute.
  
      Returns:
          The retrieved attribute or None if the key is missing.
      """
      try:
          attr = ec.codes_get(gid, key)
      except ec.KeyValueNotFoundError:
          logger.warning("Key %s not found in GRIB message", key)
          attr = None
      return attr
  
imports: import logging
  from datetime import timedelta
  import dask.array
  import numpy
  import xarray
  from satpy.readers._geos_area import get_area_definition, get_geos_area_naming
  from satpy.readers.eum_base import get_service_mode
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.readers.seviri_base import PLATFORM_DICT, REPEAT_CYCLE_DURATION, calculate_area_extent
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 11 for calling the SeviriL2GribFileHandler obj's underlying member method code with example usage: obj._get_from_msg(gid, key) and returns: attr