code: def orjson_default(obj: Any) -> Any:
      if isinstance(obj, bytes):
          # see https://stackoverflow.com/a/40000564/7351594 for example
          # the bytes are encoded with base64, and then decoded as utf-8
          # (ascii only, by the way) to get a string
          return base64.b64encode(obj).decode("utf-8")
      if isinstance(obj, pd.Timestamp):
          return obj.to_pydatetime()
      return str(obj)
  
imports: import base64
  import enum
  import mimetypes
  from collections.abc import Mapping
  from datetime import datetime, timedelta, timezone
  from fnmatch import fnmatch
  from http import HTTPStatus
  from typing import Any, Optional, TypedDict
  import orjson
  import pandas
  from libcommon.exceptions import DatasetInBlockListError
label_desc: Use image node_id 1 for calling a global function with example usage: orjson_default(obj) and returns: str, base64, obj