code: def is_diagonal_scale(scale):
      """Returns `True` if `scale` is a `LinearOperator` that is known to be diag.
  
      Args:
        scale:  `LinearOperator` instance.
  
      Returns:
        Python `bool`.
  
      Raises:
        TypeError:  If `scale` is not a `LinearOperator`.
      """
      if not isinstance(scale, tf.linalg.LinearOperator):
          raise TypeError(
              "Expected argument `scale` to be instance of "
              "`LinearOperator`. Found: `{}`.".format(scale)
          )
      return (
          isinstance(scale, tf.linalg.LinearOperatorIdentity)
          or isinstance(scale, tf.linalg.LinearOperatorScaledIdentity)
          or isinstance(scale, tf.linalg.LinearOperatorDiag)
      )
  
imports: import functools
  import hashlib
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 8 for calling a global function with example usage: is_diagonal_scale(scale) and returns: unknown