def dict_to_protobuf(pb_klass_or_instance, values, type_callable_map=REVERSE_TYPE_CALLABLE_MAP, strict=True):
 if isinstance(pb_klass_or_instance, Message):
  instance = pb_klass_or_instance
 else:
  instance = pb_klass_or_instance()
 return _dict_to_protobuf(instance, values, type_callable_map, strict)

def dict_to_protobuf ( pb_klass_or_instance , values , type_callable_map = REVERSE_TYPE_CALLABLE_MAP , strict = True ) : if isinstance ( pb_klass_or_instance , Message ) : instance = pb_klass_or_instance else : instance = pb_klass_or_instance ( ) return _dict_to_protobuf ( instance , values , type_callable_map , strict )
populates a protobuf model from a dictionary .