code: def replace(self, **kwargs):
          
          clone = copy(self)
  
          clone.transforms = list(clone.transforms)
          for key, value in kwargs.items():
              if not hasattr(clone, key):
                  raise TypeError(u'replace() got an unexpected keyword argument {!r}'.format(key))
  
              setattr(clone, key, value)
          return clone
docs: Return a copy of this `Query`, but with attributes specified
          as keyword arguments replaced by the keyword values.
  
          Keyword Args:
              Attributes/values to replace in the copy.
  
          Returns:
               A copy of the query that has its attributes updated with the specified values.
  
          Raises:
              TypeError: The `Query` does not have the specified attribute.