<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_scope(self):
 """ The scope is assembled by combining all the set flags into a single integer value which we can later check again for set bits. If *no* scope is set, we return the default scope which is the first defined scope in :attr:`provider.constants.SCOPES`. """

        default = SCOPES[0][0]

        flags = self.cleaned_data.get('scope', [])

        return scope.to_int(default=default, *flags)