code: def test_gather_dimension_numbers():
      attr = mhlo.GatherDimensionNumbers.get(
          offset_dims=[1, 2],
          collapsed_slice_dims=[3, 4, 5],
          start_index_map=[6],
          index_vector_dim=7,
      )
      assert attr is not None
      assert (
          str(attr) == "#mhlo.gather<offset_dims = [1, 2], "
          "collapsed_slice_dims = [3, 4, 5], "
          "start_index_map = [6], "
          "index_vector_dim = 7>"
      )
      assert attr.offset_dims == [1, 2]
      assert attr.collapsed_slice_dims == [3, 4, 5]
      assert attr.start_index_map == [6]
      assert attr.index_vector_dim == 7
  
file_path: tensorflow/third_party/xla/xla/mlir_hlo/tests/python/attributes.py
imports: from mlir import ir
  from mlir.dialects import mhlo
label_desc: Use image node_id 10 for calling a global function with example usage: test_gather_dimension_numbers() without return types