code: def _type(operator):
      """Returns the type name constant (e.g. _TRIL) for operator."""
      if isinstance(operator, linear_operator_diag.LinearOperatorDiag):
          return _DIAG
      if isinstance(
          operator,
          linear_operator_lower_triangular.LinearOperatorLowerTriangular,
      ):
          return _TRIL
      if isinstance(
          operator, linear_operator_full_matrix.LinearOperatorFullMatrix
      ):
          return _MATRIX
      if isinstance(
          operator, linear_operator_identity.LinearOperatorIdentity
      ):
          return _IDENTITY
      if isinstance(
          operator,
          linear_operator_identity.LinearOperatorScaledIdentity,
      ):
          return _SCALED_IDENTITY
      raise TypeError(
          f"Expected operator to be one of [LinearOperatorDiag, "
          f"LinearOperatorLowerTriangular, LinearOperatorFullMatrix, "
          f"LinearOperatorIdentity, LinearOperatorScaledIdentity]. "
          f"Received: {operator}"
      )
  
imports: import abc
  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 check_ops
  from tensorflow.python.ops.linalg import linear_operator
  from tensorflow.python.ops.linalg import linear_operator_diag
  from tensorflow.python.ops.linalg import linear_operator_full_matrix
  from tensorflow.python.ops.linalg import linear_operator_identity
  from tensorflow.python.ops.linalg import linear_operator_lower_triangular
label_desc: Use image node_id 6 for calling a global function with example usage: _type(operator) and returns: _DIAG, _TRIL, _MATRIX, _IDENTITY, _SCALED_IDENTITY