code: def restrict(self,subinterval):
          
          if (subinterval[0] < self._domain[0]) or (subinterval[1] > self._domain[1]):
              raise ValueError("Can only restrict to subinterval")
          return self.from_function(self, subinterval)
docs: Return a Polyfun that matches self on subinterval.