def _replace(_self, **kwds):
    """Return a new Quad object replacing specified fields with new values"""
    result = _self._make(map(kwds.pop, ('subject', 'predicate', 'object',
        'graph'), _self))
    if kwds:
        raise ValueError('Got unexpected field names: %r' % kwds.keys())
    return result
