code: def scale(self, scalar, ignored_terms=None):
          
  
          if ignored_terms is None:
              ignored_terms = set()
          else:
              ignored_terms = {asfrozenset(term) for term in ignored_terms}
  
          for term in self:
              if term not in ignored_terms:
                  self[term] *= scalar
docs: Multiply the polynomial by the given scalar.
  
          Args:
              scalar (number):
                  Value to multiply the polynomial by.
  
              ignored_terms (iterable, optional):
                  Biases associated with these terms are not scaled.