class_docstr: Unit test class for monkeypatch utils
class_docstr_tok: ["Unit","test","class","for","monkeypatch","utils"]
code: def test_get_cu_seqlens_from_pos_ids_1d(self):
      position_ids = torch.tensor(
          [[0, 1, 2, 3, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 0, 0]]
      )
      target_res = torch.tensor(
          [0, 4, 7, 12, 14, 16], dtype=torch.int32
      )
      self.assertTrue(
          torch.allclose(
              get_cu_seqlens_from_pos_ids(position_ids)[0], target_res
          )
      )
  
imports: import unittest
  import torch
  from axolotl.monkeypatch.utils import get_cu_seqlens, get_cu_seqlens_from_pos_ids
label_desc: Use image node_id 2 for calling the TestMonkeyPatchUtils obj's underlying member method code with example usage: obj.test_get_cu_seqlens_from_pos_ids_1d() without return types