code: def logdet(matrix, name=None):
      """Computes log of the determinant of a hermitian positive definite matrix.
  
      ```python
      # Compute the determinant of a matrix while reducing the chance of over- or
      underflow:
      A = ... # shape 10 x 10
      det = tf.exp(tf.linalg.logdet(A))  # scalar
      ```
  
      Args:
        matrix:  A `Tensor`. Must be `float16`, `float32`, `float64`, `complex64`,
          or `complex128` with shape `[..., M, M]`.
        name:  A name to give this `Op`.  Defaults to `logdet`.
  
      Returns:
        The natural log of the determinant of `matrix`.
  
      @compatibility(numpy)
      Equivalent to numpy.linalg.slogdet, although no sign is returned since only
      hermitian positive definite matrices are supported.
      @end_compatibility
      """
      # This uses the property that the log det(A) = 2*sum(log(real(diag(C))))
      # where C is the cholesky decomposition of A.
      with ops.name_scope(name, "logdet", [matrix]):
          chol = gen_linalg_ops.cholesky(matrix)
          return 2.0 * math_ops.reduce_sum(
              math_ops.log(
                  math_ops.real(array_ops.matrix_diag_part(chol))
              ),
              axis=[-1],
          )
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gen_linalg_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import special_math_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: logdet(matrix, name) and returns: unknown