code: def lqmn(m, n, z):
      """Sequence of associated Legendre functions of the second kind.
  
      Computes the associated Legendre function of the second kind of order m and
      degree n, ``Qmn(z)`` = :math:`Q_n^m(z)`, and its derivative, ``Qmn'(z)``.
      Returns two arrays of size ``(m+1, n+1)`` containing ``Qmn(z)`` and
      ``Qmn'(z)`` for all orders from ``0..m`` and degrees from ``0..n``.
  
      Parameters
      ----------
      m : int
         ``|m| <= n``; the order of the Legendre function.
      n : int
         where ``n >= 0``; the degree of the Legendre function.  Often
         called ``l`` (lower case L) in descriptions of the associated
         Legendre function
      z : complex
          Input value.
  
      Returns
      -------
      Qmn_z : (m+1, n+1) array
         Values for all orders 0..m and degrees 0..n
      Qmn_d_z : (m+1, n+1) array
         Derivatives for all orders 0..m and degrees 0..n
  
      References
      ----------
      .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
             Functions", John Wiley and Sons, 1996.
             https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html
  
      """
      if not isscalar(m) or (m < 0):
          raise ValueError("m must be a non-negative integer.")
      if not isscalar(n) or (n < 0):
          raise ValueError("n must be a non-negative integer.")
      if not isscalar(z):
          raise ValueError("z must be scalar.")
      m = int(m)
      n = int(n)
  
      # Ensure neither m nor n == 0
      mm = max(1, m)
      nn = max(1, n)
  
      if iscomplex(z):
          q, qd = specfun.clqmn(mm, nn, z)
      else:
          q, qd = specfun.lqmn(mm, nn, z)
      return q[: (m + 1), : (n + 1)], qd[: (m + 1), : (n + 1)]
  
imports: import operator
  import numpy
  import math
  from numpy import pi, asarray, floor, isscalar, iscomplex, real, imag, sqrt, where, mgrid, sin, place, issubdtype, extract, inexact, nan, zeros, sinc
  from .None import _ufuncs
  from ._ufuncs import mathieu_a, mathieu_b, iv, jv, gamma, psi, hankel1, hankel2, yv, kv, ndtri, poch, binom, hyp0f1
  from .None import specfun
  from .None import orthogonal
  from ._comb import _comb_int
label_desc: Use image node_id 31 for calling a global function with example usage: lqmn(m, n, z) and returns: q,  qd