class_docstr: Structure to discover and store `Dataset` dependencies.
  
  Used primarily by the `Scene` object to organize dependency finding.
  Dependencies are stored used a series of `Node` objects which this
  class is a subclass of.
class_docstr_tok: ["Structure","to","discover","and","store","`","Dataset","`","dependencies",".","Used","primarily","by","the","`","Scene","`","object","to","organize","dependency","finding",".","Dependencies","are","stored","used","a","series","of","`","Node","`","objects","which","this","class","is","a","subclass","of","."]
docstr: Populate the dependency tree.
  
  Args:
      dataset_keys (set): Strings, DataIDs, DataQuerys to find dependencies for
      query (DataQuery): Additional filter parameters. See
                        `satpy.readers.get_key` for more details.
  
  Returns:
      (Node, set): Root node of the dependency tree and a set of unknown datasets
docstr_tok: ["Populate","the","dependency","tree",".","Args",":","dataset_keys","(","set",")",":","Strings",",","DataIDs",",","DataQuerys","to","find","dependencies","for","query","(","DataQuery",")",":","Additional","filter","parameters",".","See","`","satpy.readers.get_key","`","for","more","details",".","Returns",":","(","Node",",","set",")",":","Root","node","of","the","dependency","tree","and","a","set","of","unknown","datasets"]
code: def populate_with_keys(self, dataset_keys: set, query=None):
      """Populate the dependency tree.
  
      Args:
          dataset_keys (set): Strings, DataIDs, DataQuerys to find dependencies for
          query (DataQuery): Additional filter parameters. See
                            `satpy.readers.get_key` for more details.
  
      Returns:
          (Node, set): Root node of the dependency tree and a set of unknown datasets
  
      """
      unknown_datasets = list()
      known_nodes = list()
      for key in dataset_keys.copy():
          try:
              dsq = create_filtered_query(key, query)
              node = self._create_subtree_for_key(dsq, query)
          except MissingDependencies as unknown:
              unknown_datasets.append(unknown.missing_dependencies)
          else:
              known_nodes.append(node)
              self.add_child(self._root, node)
  
      for key in dataset_keys.copy():
          dataset_keys.discard(key)
      for node in known_nodes:
          dataset_keys.add(node.name)
      if unknown_datasets:
          raise MissingDependencies(
              unknown_datasets, "Unknown datasets:"
          )
  
imports: from __future__ import annotations
  from typing import Container, Iterable, Optional
  import numpy
  from satpy import DataID, DatasetDict
  from satpy.dataset import ModifierTuple, create_filtered_query
  from satpy.dataset.data_dict import TooManyResults, get_key
  from satpy.node import EMPTY_LEAF_NAME, LOG, CompositorNode, MissingDependencies, Node, ReaderNode
label_desc: Use image node_id 5 for calling the DependencyTree obj's underlying member method code with example usage: obj.populate_with_keys(dataset_keys, query) without return types