<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def FilterArgsFromSemanticProtobuf(protobuf, kwargs):
 """Assign kwargs to the protobuf, and remove them from the kwargs dict."""

  for descriptor in protobuf.type_infos:
    value = kwargs.pop(descriptor.name, None)
    if value is not None:
      setattr(protobuf, descriptor.name, value)