code: def filter_source(self, source):
          # pylint: disable=R0911,R0912
          
          for key, value in self.filters.items():
              if key == 'applyToTectonicRegionType':
                  if value != source.tectonic_region_type:
                      return False
              elif key == 'applyToSourceType':
                  if value == 'area':
                      if not isinstance(source, ohs.AreaSource):
                          return False
                  elif value == 'point':
                      # area source extends point source
                      if (not isinstance(source, ohs.PointSource)
                              or isinstance(source, ohs.AreaSource)):
                          return False
                  elif value == 'simpleFault':
                      if not isinstance(source, ohs.SimpleFaultSource):
                          return False
                  elif value == 'complexFault':
                      if not isinstance(source, ohs.ComplexFaultSource):
                          return False
                  elif value == 'characteristicFault':
                      if not isinstance(source, ohs.CharacteristicFaultSource):
                          return False
                  else:
                      raise AssertionError("unknown source type '%s'" % value)
              elif key == 'applyToSources':
                  if source and source.source_id not in value:
                      return False
              else:
                  raise AssertionError("unknown filter '%s'" % key)
          # All filters pass, return True.
          return True
docs: Apply filters to ``source`` and return ``True`` if uncertainty should
          be applied to it.