Return a new NamedTuple object replacing specified fields with new values

def _replace(self, **kwds):
        'Return a new NamedTuple object replacing specified fields with new values'
        result = self._make(map(kwds.pop, self._fields, self))
        
        if kwds:
            raise ValueError('Got unexpected field names: %r' % kwds.keys())
        
        return result