A General Framework for Distributed Inference with Uncertain Models