code: def subset_matrix(
      mat: tf.Tensor, inds_0: tf.Tensor, inds_1: tf.Tensor
  ) -> tf.Tensor:
      """
      Take a matrix and return the submatrix correspond to provided row and column indices
  
      Parameters
      ----------
      mat
          A 2D matrix
      inds_0
          A vector of row indices
      inds_1
          A vector of column indices
  
      Returns
      -------
      A submatrix of shape (len(inds_0), len(inds_1))
      """
      if len(mat.shape) != 2:
          raise ValueError(
              "Subsetting only supported for matrices (2D)"
          )
      subbed_rows = tf.gather(mat, inds_0, axis=0)
      subbed_rows_cols = tf.gather(subbed_rows, inds_1, axis=1)
      return subbed_rows_cols
  
imports: import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: subset_matrix(mat, inds_0, inds_1) and returns: subbed_rows_cols