def trials_from_docs(docs, validate=True, **kwargs):
 rval = Trials(**kwargs)
 if validate:
  rval.insert_trial_docs(docs)
 else:
  rval._insert_trial_docs(docs)
 rval.refresh()
 return rval

def trials_from_docs ( docs , validate = True , ** kwargs ) : rval = Trials ( ** kwargs ) if validate : rval . insert_trial_docs ( docs ) else : rval . _insert_trial_docs ( docs ) rval . refresh ( ) return rval
construct a trials base class instance from a list of trials documents .