<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear(self, policy='all'):
 """ Clear all subscribers registered to this stream. The default policy of 'all' clears all subscribers. If policy is set to 'user', only subscribers defined by the user are cleared (precedence between zero and one). A policy of 'internal' clears subscribers with precedence greater than unity used internally by HoloViews. """

        policies = ['all', 'user', 'internal']
        if policy not in policies:
            raise ValueError('Policy for clearing subscribers must be one of %s' % policies)
        if policy == 'all':
            remaining = []
        elif policy == 'user':
            remaining = [(p, s) for (p, s) in self._subscribers if p > 1]
        else:
            remaining = [(p, s) for (p, s) in self._subscribers if p <= 1]
        self._subscribers = remaining