class_docstr: Performs DP aggregations.
class_docstr_tok: ["Performs","DP","aggregations","."]
docstr: Drops partitions in `col` which are not in `partitions`.
docstr_tok: ["Drops","partitions","in","`","col","`","which","are","not","in","`","partitions","`","."]
code: def _drop_partitions(
      self, col, partitions, partition_extractor: Callable
  ):
      """Drops partitions in `col` which are not in `partitions`."""
      col = pipeline_functions.key_by(
          self._backend, col, partition_extractor, "Key by partition"
      )
      col = self._backend.filter_by_key(
          col, partitions, "Filtering out partitions"
      )
      return self._backend.values(col, "Drop key")
  
imports: import functools
  from typing import Any, Callable, Optional, Sequence, Tuple, Union
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import combiners
  from pipeline_dp import contribution_bounders
  from pipeline_dp import dp_computations
  from pipeline_dp import partition_selection
  from pipeline_dp import pipeline_functions
  from pipeline_dp import report_generator
  from pipeline_dp import sampling_utils
  from pipeline_dp.dataset_histograms import computing_histograms
  from pipeline_dp.private_contribution_bounds import PrivateL0Calculator
label_desc: Use image node_id 12 for calling the DPEngine obj's underlying member method code with example usage: obj._drop_partitions(col, partitions, partition_extractor) and returns: self