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","."]
docstr: Add metadata that is specific to Satpy.
docstr_tok: ["Add","metadata","that","is","specific","to","Satpy","."]
code: def _add_satpy_metadata(
      self, data_id: DataID, data_arr: xr.DataArray
  ):
      """Add metadata that is specific to Satpy."""
      new_attrs = {
          "platform_name": "EOS-" + self.metadata_platform_name,
          "sensor": "modis",
      }
  
      res = data_id["resolution"]
      rps = self._resolution_to_rows_per_scan(res)
      new_attrs["rows_per_scan"] = rps
  
      data_arr.attrs.update(new_attrs)
  
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 17 for calling the HDFEOSBaseFileReader obj's underlying member method code with example usage: obj._add_satpy_metadata(data_id, data_arr) without return types