def find_integrator_for(prior, posterior):
 for (name, obj) in inspect.getmembers(sys.modules[__name__]):
  if (inspect.isclass(obj) and issubclass(obj, KLIntegrator)):
   corresponds = (isinstance(prior, obj.prior_class) and isinstance(posterior, obj.posterior_class))
   if corresponds:
    return obj()
 return None

def find_integrator_for ( prior , posterior ) : for ( name , obj ) in inspect . getmembers ( sys . modules [ __name__ ] ) : if ( inspect . isclass ( obj ) and issubclass ( obj , KLIntegrator ) ) : corresponds = ( isinstance ( prior , obj . prior_class ) and isinstance ( posterior , obj . posterior_class ) ) if corresponds : return obj ( ) return None
returns a klintegrator instance compatible with prior and posterior .