docs: def spherical_histogram(data=None, radial_bins="numpy", theta_bins=16, phi_bins=16, transformed=False, *args, **kwargs):
      """Facade construction function for the SphericalHistogram.
  
      """
  
      dropna = kwargs.pop("dropna", True)
      data = _prepare_data(data, transformed=transformed, klass=SphericalHistogram, dropna=dropna)
  
      if isinstance(theta_bins, int):
          theta_range = (0, np.pi)
          if "theta_range" in "kwargs":
              theta_range = kwargs["theta_range"]
          elif "range" in "kwargs":
              theta_range = kwargs["range"][1]
          theta_range = list(theta_range) + [theta_bins + 1]
          theta_bins = np.linspace(*theta_range)
  
      if isinstance(phi_bins, int):
          phi_range = (0, 2 * np.pi)
          if "phi_range" in "kwargs":
              phi_range = kwargs["phi_range"]
          elif "range" in "kwargs":
              phi_range = kwargs["range"][2]
          phi_range = list(phi_range) + [phi_bins + 1]
          phi_bins = np.linspace(*phi_range)
  
      bin_schemas = binnings.calculate_bins_nd(data, [radial_bins, theta_bins, phi_bins], *args,
                                               check_nan=not dropna, **kwargs)
      weights = kwargs.pop("weights", None)
      frequencies, errors2, missed = histogram_nd.calculate_frequencies(data, ndim=3,
                                                                    binnings=bin_schemas,
                                                                    weights=weights)
      return SphericalHistogram(binnings=bin_schemas, frequencies=frequencies, errors2=errors2, missed=missed)