def clean(self, value):
        if value is None:
            # Value is nothing; return it.
            return value

        try:
            try:
                if self.short:
                    # Attempt to coerce the short UUID.
                    return shortuuid.decode(value)

            except ValueError:
                pass

            # Attempt to coerce the UUID.
            return uuid.UUID(value)

        except __HOLE__:
            raise ValueError(
                'UUID must be of the form: '
                'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
dataset/ETHPy150Open armet/python-armet/armet/attributes/uuid.py/UUIDAttribute.clean