code: def test_argtopk_1d_collision(self, size, k, dtype, sorted):
      # with non-unique kth max value
      if isinstance(k, str):
          k = eval(k.replace("n", str(size)))
  
      x = vector(name="x", dtype=dtype)
      y = argtopk(x, k, sorted=sorted, idx_dtype="int32")
      # DebugMode won't like the index change on collision on CPU
      # So don't use DebugMode here.
      mode = self.mode
      if isinstance(self.mode, pytensor.compile.debugmode.DebugMode):
          mode = Mode(optimizer=mode.optimizer)
      fn = pytensor.function([x], y, mode=mode)
      assert any(
          isinstance(n.op, self.op_class)
          for n in fn.maker.fgraph.apply_nodes
      )
      rng = np.random.default_rng(utt.fetch_seed())
      xval = np.repeat(
          rng.uniform(-100.0, 100.0, size=size // 2).astype(dtype), 2
      )
      xval = xval[rng.permutation(size)]
      yval = fn(xval)
      idx = slice(-k, None) if k > 0 else slice(-k)
      goal = np.argsort(xval)[idx].astype("int32")
      utt.assert_allclose(np.sort(xval[yval]), np.sort(xval[goal]))
  
imports: from functools import reduce
  from itertools import chain, product
  import numpy
  import pytest
  import pytensor
  from pytensor.compile.mode import Mode
  from pytensor.tensor.sort import ArgSortOp, SortOp, TopKOp, argsort, argtopk, sort, topk, topk_and_argtopk
  from pytensor.tensor.type import dmatrix, dvector, float_dtypes, integer_dtypes, lscalar, matrix, scalar, tensor, vector
  from tests import unittest_tools
label_desc: Use image node_id 8 for calling the TestTopK obj's underlying member method code with example usage: obj.test_argtopk_1d_collision(size, k, dtype, sorted) without return types