docs: def validate_overlap(comp1, comp2, force):
      """Validate the overlap between the wavelength sets
      of the two given components.
  
      Parameters
      ----------
      comp1, comp2 : `~pysynphot.spectrum.SourceSpectrum` or `~pysynphot.spectrum.SpectralElement`
          Source spectrum and bandpass of an observation.
  
      force : {'extrap', 'taper', `None`}
          If not `None`, the components may be adjusted by
          extrapolation or tapering.
  
      Returns
      -------
      comp1, comp2
          Same as inputs. However, ``comp1`` might be tapered
          if that option is selected.
  
      warnings : dict
          Maps warning keyword to its description.
  
      Raises
      ------
      KeyError
          Invalid ``force``.
  
      pysynphot.exceptions.DisjointError
          No overlap detected when ``force`` is `None`.
  
      pysynphot.exceptions.PartialOverlap
          Partial overlap detected when ``force`` is `None`.
  
      """
      warnings = dict()
      if force is None:
          stat = comp2.check_overlap(comp1)
          if stat=='full':
              pass
          elif stat == 'partial':
              raise(exceptions.PartialOverlap('Spectrum and bandpass do not fully overlap. You may use force=[extrap|taper] to force this Observation anyway.'))
          elif stat == 'none':
              raise(exceptions.DisjointError('Spectrum and bandpass are disjoint'))
  
      elif force.lower() == 'taper':
          try:
              comp1=comp1.taper()
          except AttributeError:
              comp1=comp1.tabulate().taper()
              warnings['PartialOverlap']=force
  
      elif force.lower().startswith('extrap'):
          #default behavior works, but check the overlap so we can set the warning
          stat=comp2.check_overlap(comp1)
          if stat == 'partial':
              warnings['PartialOverlap']=force
  
      else:
          raise(KeyError("Illegal value force=%s; legal values=('taper','extrap')"%force))
      return comp1, comp2, warnings