def get_scopes_for(self, user_provided_scopes):
if user_provided_scopes is None:<EOL><INDENT>user_provided_scopes = [app_part for app_part in self._oauth_scopes]<EOL><DEDENT>elif isinstance(user_provided_scopes, str):<EOL><INDENT>user_provided_scopes = [user_provided_scopes]<EOL><DEDENT>if not isinstance(user_provided_scopes, (list, tuple)):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>")<EOL><DEDENT>scopes = set()<EOL>for app_part in user_provided_scopes:<EOL><INDENT>for scope in self._oauth_scopes.get(app_part, [(app_part,)]):<EOL><INDENT>scopes.add(self._prefix_scope(scope))<EOL><DEDENT><DEDENT>return list(scopes)<EOL>
Returns a list of scopes needed for each of the
        scope_helpers provided, by adding the prefix to them if required

        :param user_provided_scopes: a list of scopes or scope helpers
        :type user_provided_scopes: list or tuple or str
        :return: scopes with url prefix added
        :rtype: list
        :raises ValueError: if unexpected datatype of scopes are passed