code: def _check_callbacks(callbacks):
      if callbacks is not None:
          # If list was passed, make sure all of them are actually callable
          if isinstance(callbacks, Iterable):
              if any(not callable(c) for c in callbacks):
                  raise ValueError(
                      "`callbacks` must contain callable objects!"
                  )
          # The gradient descent method deals with lists
          elif callable(callbacks):
              callbacks = (callbacks,)
          else:
              raise ValueError("`callbacks` must be a callable object!")
  
      return callbacks
  
imports: import inspect
  import logging
  import multiprocessing
  from collections.abc import Iterable
  from types import SimpleNamespace
  from time import time
  import numpy
  from sklearn.base import BaseEstimator
  from openTSNE import _tsne
  from openTSNE import initialization
  from openTSNE.affinity import Affinities, MultiscaleMixture
  from openTSNE.quad_tree import QuadTree
  from openTSNE import utils
label_desc: Use image node_id 1 for calling a global function with example usage: _check_callbacks(callbacks) and returns: callbacks