code: def _mask_data_below_surface_pressure(datasets_loaded, dataset_keys):
      LOG.debug(
          "Filtering pressure levels at or below the surface pressure"
      )
      for ds_id in sorted(dataset_keys):
          ds = datasets_loaded[ds_id]
          if (
              "surface_pressure" not in ds.attrs
              or "pressure_levels" not in ds.attrs
          ):
              continue
          data_pressure = ds.attrs["pressure_levels"]
          surface_pressure = ds.attrs["surface_pressure"]
          if isinstance(surface_pressure, float):
              # scalar needs to become array for each record
              surface_pressure = np.repeat(
                  surface_pressure, ds.shape[0]
              )
          if (
              surface_pressure.ndim == 1
              and surface_pressure.shape[0] == ds.shape[0]
          ):
              # surface is one element per record
              LOG.debug(
                  "Filtering %s at and below the surface pressure",
                  ds_id,
              )
              if ds.ndim == 2:
                  surface_pressure = np.repeat(
                      surface_pressure[:, None],
                      data_pressure.shape[0],
                      axis=1,
                  )
                  data_pressure = np.repeat(
                      data_pressure[None, :],
                      surface_pressure.shape[0],
                      axis=0,
                  )
                  datasets_loaded[ds_id] = ds.where(
                      data_pressure < surface_pressure
                  )
              else:
                  # entire dataset represents one pressure level
                  data_pressure = ds.attrs["pressure_level"]
                  datasets_loaded[ds_id] = ds.where(
                      data_pressure < surface_pressure
                  )
          else:
              LOG.warning(
                  "Not sure how to handle shape of 'surface_pressure' metadata"
              )
  
imports: import logging
  from collections import defaultdict
  import numpy
  import pandas
  import xarray
  from satpy.readers.netcdf_utils import NetCDF4FileHandler
  from satpy.readers.yaml_reader import FileYAMLReader
label_desc: Use image node_id 3 for calling a global function with example usage: _mask_data_below_surface_pressure(datasets_loaded, dataset_keys) without return types