code: def test_rename_duplicates(self):
      mt = hl.utils.range_matrix_table(5, 5)
  
      assert hl.rename_duplicates(
          mt.key_cols_by(s=hl.str(mt.col_idx))
      ).unique_id.collect() == [
          "0",
          "1",
          "2",
          "3",
          "4",
      ]
  
      assert hl.rename_duplicates(
          mt.key_cols_by(s="0")
      ).unique_id.collect() == ["0", "0_1", "0_2", "0_3", "0_4"]
  
      assert hl.rename_duplicates(
          mt.key_cols_by(
              s=hl.literal(["0", "0_1", "0", "0_2", "0"])[mt.col_idx]
          )
      ).unique_id.collect() == ["0", "0_1", "0_2", "0_2_1", "0_3"]
  
      assert (
          hl.rename_duplicates(
              mt.key_cols_by(s=hl.str(mt.col_idx)), "foo"
          )["foo"].dtype
          == hl.tstr
      )
  
imports: import unittest
  import hail
  from ..helpers import *
label_desc: Use image node_id 1 for calling the Tests obj's underlying member method code with example usage: obj.test_rename_duplicates() without return types