class_docstr: Base file handler for HDF EOS data for both L1b and L2 products.
class_docstr_tok: ["Base","file","handler","for","HDF","EOS","data","for","both","L1b","and","L2","products","."]
code: def _read_mda(cls, lines, element=None):
      current_dict = {}
  
      for line in lines:
          if not line:
              continue
          if line == "END":
              return current_dict
  
          key, val = cls._split_line(line, lines)
  
          if key in ["GROUP", "OBJECT"]:
              current_dict[val] = cls._read_mda(lines, val)
          elif key in ["END_GROUP", "END_OBJECT"]:
              if val != element:
                  raise SyntaxError("Non-matching end-tag")
              return current_dict
          elif key in ["CLASS", "NUM_VAL"]:
              pass
          else:
              current_dict[key] = val
      logger.warning("Malformed EOS metadata, missing an END.")
      return current_dict
  
imports: from __future__ import annotations
  import logging
  import re
  from ast import literal_eval
  from contextlib import suppress
  from datetime import datetime
  import numpy
  import xarray
  from pyhdf.error import HDF4Error
  from pyhdf.SD import SD
  from satpy import DataID
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import normalize_low_res_chunks
label_desc: Use image node_id 4 for calling the HDFEOSBaseFileReader obj's underlying member method code with example usage: obj._read_mda(cls, lines, element) and returns: current_dict, current_dict, current_dict