code: def _check_signal(self, s):
          r
          s = np.asanyarray(s)
          if s.shape[0] != self.n_vertices:
              raise ValueError('First dimension must be the number of vertices '
                               'G.N = {}, got {}.'.format(self.N, s.shape))
          return s
docs: r"""Check if signal is valid.