code: def test_argtopk_1d(self, size, k, dtype, sorted, idx_dtype):
      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=idx_dtype)
      fn = pytensor.function([x], y, mode=self.mode)
      assert any(
          isinstance(n.op, self.op_class)
          for n in fn.maker.fgraph.apply_nodes
      )
  
      # assert local_useless_topk opt is done properly
      assert 1 == len(fn.maker.fgraph.outputs[0].owner.outputs)
  
      # generate a all-unique array
      xval = gen_unique_vector(size, dtype)
      yval = fn(xval)
      idx = slice(-k, None) if k > 0 else slice(-k)
      goal = np.argsort(xval)[idx].astype(idx_dtype)
  
      # due to uniqueness, we expect indices same
      assert np.all(xval[np.sort(yval)] == xval[np.sort(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 6 for calling the TestTopK obj's underlying member method code with example usage: obj.test_argtopk_1d(size, k, dtype, sorted, idx_dtype) without return types