code: def test_first_true_indices(device):
      bools = torch.tensor(
          [
              [False, True, True],
              [True, True, False],
              [True, False, True],
              [False, False, False],
              [True, False, False],
              [False, False, True],
          ],
          device=device,
      )
      want = torch.tensor([1, 0, 0, 3, 0, 2], device=device)
      assert_eq(first_true_indices(bools), want)
  
      for bool_row, row_want in zip(bools, want):
          assert_eq(first_true_indices(bool_row), row_want)
  
imports: import numpy
  import pytest
  import torch
  from summarize_from_feedback.utils.assertions import assert_eq, assert_allclose
  from summarize_from_feedback.utils.torch_utils import first_true_indices, label_logprobs
label_desc: Use image node_id 1 for calling a global function with example usage: test_first_true_indices(device) without return types