The documentation for the get_int(key) and get_str(key) functions in https://tvm.apache.org/docs/api/python/ir.html#tvm.ir.Attrs seem inaccurate. Both functions actually can return attribute values with any type and does not perform any casting: https://github.com/apache/tvm/blob/main/python/tvm/ir/attrs.py#L66. Also, these functions are essentially doing the same thing, so maybe a single get_item function would be enough.