<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scale(self, scalar, ignored_terms=None):
 """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. """


        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