code: def _is_upper_triangular(A):
      # This function could possibly be of wider interest.
      if isspmatrix(A):
          lower_part = scipy.sparse.tril(A, -1)
          # Check structural upper triangularity,
          # then coincidental upper triangularity if needed.
          return lower_part.nnz == 0 or lower_part.count_nonzero() == 0
      else:
          return not np.tril(A, -1).any()
  
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 5 for calling a global function with example usage: _is_upper_triangular(A) and returns: unknown, unknown