'Parse and validate the args.
Note we pop all the args we consume here - so if there are any args we dont
know about, args will not be an empty dict after this. This allows the same
args to be parsed by several TypeDescriptorSets.
Args:
args: A dictionary of arguments that this TypeDescriptorSet might use. If
this dict does not have a required parameter, we still yield its default
value.
Yields:
A (name, value) tuple of the parsed args.'

def ParseArgs(self, args):

    for descriptor in self:
        value = args.pop(descriptor.name, None)
        if (value is None):
            value = descriptor.default
        else:
            try:
                value = descriptor.Validate(value)
            except Exception:
                logging.error('Invalid    value    %s    for    arg    %s', value, descriptor.name)
                raise
        (yield (descriptor.name, value))
