class_docstr: Generic GRIB file handler.
class_docstr_tok: ["Generic","GRIB","file","handler","."]
code: def _analyze_messages(self, grib_file):
      grib_file.seek(0)
      for idx, msg in enumerate(grib_file):
          msg_id = DataQuery(
              name=msg["shortName"],
              level=msg["level"],
              modifiers=tuple(),
          )
          ds_info = {
              "message": idx + 1,
              "name": msg["shortName"],
              "level": msg["level"],
              "file_type": self.filetype_info["file_type"],
          }
          self._msg_datasets[msg_id] = ds_info
  
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import pygrib
  import xarray
  from pyproj import Proj
  from pyresample import geometry
  from satpy.dataset import DataQuery
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 2 for calling the GRIBFileHandler obj's underlying member method code with example usage: obj._analyze_messages(grib_file) without return types