parameters: (self, sources)
docstring: Initializes the tree with a set of sources.
  
      Args:
        sources: A set of JavaScript sources.
  
      Raises:
        MultipleProvideError: A namespace is provided by muplitple sources.
        NamespaceNotFoundError: A namespace is required but never provided.
docstring_summary: Initializes the tree with a set of sources.
docstring_tokens: Initializes the tree with a set of sources .
function: def __init__(self, sources):
      """Initializes the tree with a set of sources.
  
      Args:
        sources: A set of JavaScript sources.
  
      Raises:
        MultipleProvideError: A namespace is provided by muplitple sources.
        NamespaceNotFoundError: A namespace is required but never provided.
      """
  
      self._sources = sources
      self._provides_map = dict()
  
      # Ensure nothing was provided twice.
      for source in sources:
        for provide in source.provides:
          if provide in self._provides_map:
            raise MultipleProvideError(
                provide, [self._provides_map[provide], source])
  
          self._provides_map[provide] = source
  
      # Check that all required namespaces are provided.
      for source in sources:
        for require in source.requires:
          if require not in self._provides_map:
            raise NamespaceNotFoundError(require, source)
function_tokens: def __init__ ( self , sources ) : self . _sources = sources self . _provides_map = dict ( ) # Ensure nothing was provided twice. for source in sources : for provide in source . provides : if provide in self . _provides_map : raise MultipleProvideError ( provide , [ self . _provides_map [ provide ] , source ] ) self . _provides_map [ provide ] = source # Check that all required namespaces are provided. for source in sources : for require in source . requires : if require not in self . _provides_map : raise NamespaceNotFoundError ( require , source )