code: def complement(self, frame_bound=None):
          r
  
          def kernel(x, *args, **kwargs):
  
              y = self.evaluate(x)
              np.power(y, 2, out=y)
              y = np.sum(y, axis=0)
  
              if frame_bound is None:
                  bound = y.max()
              elif y.max() > frame_bound:
                  raise ValueError('The chosen bound is not feasible. '
                                   'Choose at least {}.'.format(y.max()))
              else:
                  bound = frame_bound
  
              return np.sqrt(bound - y)
  
          return Filter(self.G, kernel)
docs: r"""Return the filter that makes the frame tight.
  
          The complementary filter is designed such that the union of a filter
          bank and its complementary filter forms a tight frame.
  
          Parameters
          ----------
          frame_bound : float or None
              The desired frame bound :math:`A = B` of the resulting tight frame.
              The chosen bound should be larger than the sum of squared
              evaluations of all filters in the filter bank. If None (the
              default), the method chooses the smallest feasible bound.
  
          Returns
          -------
          complement: Filter
              The complementary filter.
  
          See Also
          --------
          estimate_frame_bounds: estimate the frame bounds
  
          Examples
          --------
          >>> from matplotlib import pyplot as plt
          >>> G = graphs.Sensor(100, seed=42)
          >>> G.estimate_lmax()
          >>> g = filters.Abspline(G, 4)
          >>> A, B = g.estimate_frame_bounds()
          >>> print('A={:.3f}, B={:.3f}'.format(A, B))
          A=0.200, B=1.971
          >>> fig, axes = plt.subplots(1, 2)
          >>> fig, ax = g.plot(ax=axes[0])
          >>> g += g.complement()
          >>> A, B = g.estimate_frame_bounds()
          >>> print('A={:.3f}, B={:.3f}'.format(A, B))
          A=1.971, B=1.971
          >>> fig, ax = g.plot(ax=axes[1])