<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def uuid(self, version: int = None) -> str: """Generate random UUID. :param version: UUID version. :return: UUID """

        bits = self.random.getrandbits(128)
        return str(uuid.UUID(int=bits, version=version))