code: def clear(self, policy='all'):
          
          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
docs: 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.