import copy # Make deep copies of arguments to treat the arguments as structs. # https://stackoverflow.com/a/15398021 def llm_by_value(f): def _f(*args, **kwargs): argsCopy = copy.deepcopy(args) kwargsCopy = copy.deepcopy(kwargs) return f(*argsCopy, **kwargsCopy) return _f # Tell if string is a digit def llm_isDigit(s): return s.isdigit() # Tell if string starts with certain prefix. def llm_startsWith(s, prefix): return s.startswith(prefix) # Convert string to integer def llm_strToInt(s): return int(s)