<prompt> Write a function to convert a given string to uppercase.  <response>: Sure, here is a Python function that can convert a given string to uppercase.pythondef to_uppercasestring:str: return string.upperFor example, if you want to convert the string Hello, I am your AI Assistant to uppercase, you can do so by calling:pythonprintto_uppercaseHello, I am your AI AssistantOutput:HELLO, I AM YOUR AI ASSISTANTThis function takes in one parameter string which is the string you want to convert to uppercase. Inside the function, we use the .upper method, available to all string objects, to convert the string to uppercase. The resulting uppercase string is then returned by the function. 