code: def _drop_attrs(
      data_arr: xr.DataArray, user_excluded_attrs: list[str] | None
  ) -> None:
      """Remove undesirable attributes."""
      attrs_to_drop = (
          (user_excluded_attrs or [])
          + _get_satpy_attrs(data_arr)
          + _get_none_attrs(data_arr)
          + ["area"]
      )
      for key in attrs_to_drop:
          data_arr.attrs.pop(key, None)
  
imports: from __future__ import annotations
  import datetime
  import json
  import logging
  from collections import OrderedDict
  import numpy
  import xarray
  from satpy.writers.utils import flatten_dict
label_desc: Use image node_id 8 for calling a global function with example usage: _drop_attrs(data_arr, user_excluded_attrs) without return types