code: def _solve_P_Q(U, V, structure=None):
      """
      A helper function for expm_2009.
  
      Parameters
      ----------
      U : ndarray
          Pade numerator.
      V : ndarray
          Pade denominator.
      structure : str, optional
          A string describing the structure of both matrices `U` and `V`.
          Only `upper_triangular` is currently supported.
  
      Notes
      -----
      The `structure` argument is inspired by similar args
      for theano and cvxopt functions.
  
      """
      P = U + V
      Q = -U + V
      if isspmatrix(U):
          return spsolve(Q, P)
      elif structure is None:
          return solve(Q, P)
      elif structure == UPPER_TRIANGULAR:
          return solve_triangular(Q, P)
      else:
          raise ValueError(
              "unsupported matrix structure: " + str(structure)
          )
  
imports: from __future__ import division, print_function, absolute_import
  import math
  import numpy
  import scipy.special
  from scipy.linalg.basic import solve, solve_triangular
  from scipy.sparse.base import isspmatrix
  from scipy.sparse.construct import eye
  from scipy.sparse.linalg import spsolve
  import scipy.sparse
  import scipy.sparse.linalg
  from scipy.sparse.linalg.interface import LinearOperator
label_desc: Use image node_id 11 for calling a global function with example usage: _solve_P_Q(U, V, structure) and returns: spsolve, solve, solve_triangular