def uuid(self, name=None, pad_length=None):
if pad_length is None:<EOL><INDENT>pad_length = self._length<EOL><DEDENT>if name is None:<EOL><INDENT>uuid = _uu.uuid4()<EOL><DEDENT>elif name.lower().startswith(("<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>uuid = _uu.uuid5(_uu.NAMESPACE_URL, name)<EOL><DEDENT>else:<EOL><INDENT>uuid = _uu.uuid5(_uu.NAMESPACE_DNS, name)<EOL><DEDENT>return self.encode(uuid, pad_length)<EOL>
Generate and return a UUID.

If the name parameter is provided, set the namespace to the provided
name and generate a UUID.