code: def date_default(obj):
      """default function for packing datetime objects in JSON."""
      if isinstance(obj, datetime):
          obj = _ensure_tzinfo(obj)
          return obj.isoformat().replace("+00:00", "Z")
      else:
          raise TypeError("%r is not JSON serializable" % obj)
  
file_path: catboost/contrib/python/jupyter-client/py2/jupyter_client/jsonutil.py
imports: from datetime import datetime
  import re
  import warnings
  from dateutil.parser import parse
  from dateutil.tz import tzlocal
  from ipython_genutils import py3compat
  from ipython_genutils.py3compat import string_types, iteritems
label_desc: Use image node_id 5 for calling a global function with example usage: date_default(obj) and returns: obj