code: def jsonify_data(data: Any) -> Any:
      """Replaces JSON-non-serializable objects with JSON-serializable.
  
      Function replaces numpy arrays and numbers with python lists and numbers, tuples is replaces with lists. All other
      object types remain the same.
  
      Args:
          data: Object to make JSON-serializable.
  
      Returns:
          Modified input data.
  
      """
      if isinstance(data, (list, tuple)):
          result = [jsonify_data(item) for item in data]
      elif isinstance(data, dict):
          result = {}
          for key in data.keys():
              result[key] = jsonify_data(data[key])
      elif isinstance(data, np.ndarray):
          result = data.tolist()
      elif isinstance(data, np.integer):
          result = int(data)
      elif isinstance(data, np.floating):
          result = float(data)
      elif callable(getattr(data, "to_serializable_dict", None)):
          result = data.to_serializable_dict()
      else:
          result = data
      return result
  
imports: import collections
  import gzip
  import os
  import secrets
  import shutil
  import tarfile
  import zipfile
  from hashlib import md5
  from itertools import chain
  from logging import getLogger
  from pathlib import Path
  from typing import Any, Generator, Iterable, List, Mapping, Optional, Sequence, Sized, Union, Collection
  from urllib.parse import urlencode, parse_qs, urlsplit, urlunsplit, urlparse
  import numpy
  import requests
  from tqdm import tqdm
label_desc: Use image node_id 20 for calling a global function with example usage: jsonify_data(data) and returns: result