<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetWorksheet(self, nameOrNumber):

 """get a sheet by number"""

                if isinstance(nameOrNumber, int):
                        return self.worksheets[nameOrNumber]
                else:
                        return self.worksheetsByName[nameOrNumber]