code: def add_snippet_client(self, name, package):
          
          # Should not load snippet with the same name more than once.
          if name in self._snippet_clients:
              raise Error(
                  self,
                  'Name "%s" is already registered with package "%s", it cannot '
                  'be used again.' %
                  (name, self._snippet_clients[name].client.package))
          # Should not load the same snippet package more than once.
          for snippet_name, client in self._snippet_clients.items():
              if package == client.package:
                  raise Error(
                      self,
                      'Snippet package "%s" has already been loaded under name'
                      ' "%s".' % (package, snippet_name))
          client = snippet_client.SnippetClient(package=package, ad=self._device)
          client.start_app_and_connect()
          self._snippet_clients[name] = client
docs: Adds a snippet client to the management.
  
          Args:
              name: string, the attribute name to which to attach the snippet
                  client. E.g. `name='maps'` attaches the snippet client to
                  `ad.maps`.
              package: string, the package name of the snippet apk to connect to.
  
          Raises:
              Error, if a duplicated name or package is passed in.