class_docstr: File handler for NUCAPS netCDF4 format.
class_docstr_tok: ["File","handler","for","NUCAPS","netCDF4","format","."]
docstr: Get metadata.
docstr_tok: ["Get","metadata","."]
code: def get_metadata(self, dataset_id, ds_info):
      """Get metadata."""
      var_path = ds_info.get(
          "file_key", "{}".format(dataset_id["name"])
      )
      shape = self.get_shape(dataset_id, ds_info)
      file_units = ds_info.get(
          "file_units", self.get(var_path + "/attr/units")
      )
      ds_info.update(getattr(self[var_path], "attrs", {}))
      # don't overwrite information in the files attrs because the same
      # `.attrs` is used for each separate Temperature pressure level dataset
      # Plus, if someone gets metadata multiple times then we are screwed
      info = ds_info
      info.update(ds_info)
      info.update(dataset_id.to_dict())
      info.update(
          {
              "shape": shape,
              "units": ds_info.get("units", file_units),
              "platform_name": self.platform_name,
              "sensor": self.sensor_names,
              "start_orbit": self.start_orbit_number,
              "end_orbit": self.end_orbit_number,
          }
      )
      if "standard_name" not in info:
          sname_path = var_path + "/attr/standard_name"
          info["standard_name"] = self.get(sname_path)
      if dataset_id["name"] != "Quality_Flag":
          anc_vars = info.get("ancillary_variables", [])
          if "Quality_Flag" not in anc_vars:
              anc_vars.append("Quality_Flag")
              info["ancillary_variables"] = anc_vars
      return info
  
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 11 for calling the NUCAPSFileHandler obj's underlying member method code with example usage: obj.get_metadata(dataset_id, ds_info) and returns: info