code: def _try_decode_object(obj):
      """Try to decode byte string."""
      try:
          decoded = obj.decode()
      except AttributeError:
          decoded = obj
      return decoded
  
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 3 for calling a global function with example usage: _try_decode_object(obj) and returns: decoded