code: def _histogram2d_dispatcher(
      x, y, bins=None, range=None, density=None, weights=None
  ):
      yield x
      yield y
  
      # This terrible logic is adapted from the checks in histogram2d
      try:
          N = len(bins)
      except TypeError:
          N = 1
      if N == 2:
          yield from bins  # bins=[x, y]
      else:
          yield bins
  
      yield weights
  
imports: import functools
  import operator
  from numpy._core.numeric import asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, intp, empty, promote_types, diagonal, nonzero, indices
  from numpy._core.overrides import set_array_function_like_doc, set_module
  from numpy._core import overrides
  from numpy._core import iinfo
  from numpy.lib._stride_tricks_impl import broadcast_to
label_desc: Use image node_id 15 for calling a global function with example usage: _histogram2d_dispatcher(x, y, bins, range, density, weights) without return types