code: def _relative_degree(z, p):
      """
      Return relative degree of transfer function from zeros and poles.
  
      This is simply len(p) - len(z), which must be nonnegative.
      A ValueError is raised if len(p) < len(z).
      """
      degree = len(p) - len(z)
      if degree < 0:
          raise ValueError(
              "Improper transfer function. "
              "Must have at least as many poles as zeros."
          )
      return degree
  
file_path: catboost/contrib/python/scipy/py2/scipy/signal/tests/mpsig.py
imports: from __future__ import division
label_desc: Use image node_id 2 for calling a global function with example usage: _relative_degree(z, p) and returns: degree