code: def _validate_other_mul_div(other):
          
          if not isinstance(other, (u.Quantity, numbers.Number,
                                    BaseUnitlessSpectrum, SourceSpectrum)):
              raise exceptions.IncompatibleSources(
                  'Can only operate on scalar number/Quantity or spectrum')
          elif (isinstance(other, u.Quantity) and
                (other.unit.decompose() != u.dimensionless_unscaled or
                 not np.isscalar(other.value) or
                 not isinstance(other.value, numbers.Real))):
              raise exceptions.IncompatibleSources(
                  'Can only operate on real scalar dimensionless Quantity')
          elif (isinstance(other, numbers.Number) and
                not (np.isscalar(other) and isinstance(other, numbers.Real))):
              raise exceptions.IncompatibleSources(
                  'Can only operate on real scalar number')
docs: Conditions for other to satisfy before mul/div.