code: def create_trie(self):
      
      trie = SourceRootTrie(self.source_root_factory)
      options = self.get_options()
  
      for category in SourceRootCategories.ALL:
        # Add patterns.
        for pattern in options.get('{}_root_patterns'.format(category), []):
          trie.add_pattern(pattern, category)
        # Add fixed source roots.
        for path, langs in options.get('{}_roots'.format(category), {}).items():
          trie.add_fixed(path, langs, category)
  
      return trie
docs: Create a trie of source root patterns from options.
  
      :returns: :class:`SourceRootTrie`