At line number https://github.com/p4lang/tdi/blob/22cb07ac887491450d2efdb65cca727f99ecd317/tdi_python/tdicli.py#L1103 few of the special characters in key name is replaced with appropriate characters such that tdi cli does not throw error (i.e., These key names are used as python method argument identifiers, python identifiers has to be alpha numeric and it cannot contain special characters).
When referred to p4 spec, "isValid()" is also an allowed key name, so this key also has to be handled properly (i.e., replacement for "()")
At line number https://github.com/p4lang/tdi/blob/22cb07ac887491450d2efdb65cca727f99ecd317/tdi_python/tdicli.py#L1103 few of the special characters in key name is replaced with appropriate characters such that tdi cli does not throw error (i.e., These key names are used as python method argument identifiers, python identifiers has to be alpha numeric and it cannot contain special characters). When referred to p4 spec, "isValid()" is also an allowed key name, so this key also has to be handled properly (i.e., replacement for "()")