def add_missing_children(models,request,include_children_for,modelgb):
  "helper for do_check. mutates request"
  for (nombre,pkey),model in models.items():
    for modelclass,pkeys in model.refkeys(include_children_for.get(nombre,())).items():
      # warning: this is defaulting to all fields of child object. don't give clients a way to restrict that until there's a reason to.
      childname=modelgb['row',modelclass].name
      for childfield,cftype in modelclass.FIELDS:
        if not isinstance(cftype,basestring) and inspect.isclass(cftype) and issubclass(cftype,syncschema.Syncable):
          merge_null_missing(request,childname,childfield,pkeys)
        elif childfield in modelclass.SENDRAW: merge_null_missing(request,childname,childfield,pkeys)
        else: pass # intentional: ignore the field
  return request # the in-place updated original
helper for do_check. mutates request