class_docstr: Handles parameter management for estimators composed of named estimators.
  
  Partly adapted from sklearn utils.metaestimator.py.
docstr: Subset dictionary d to keys in keys.
  
  Subsets `dict_to_subset` to keys in iterable `keys`.
  
  If `prefix` is passed, subsets to `f"{prefix}__{key}"` for all `key` in `keys`.
  The prefix is then removed from the keys of the return dict, i.e.,
  return has keys `{key}` where `f"{prefix}__{key}"` was key in `dict_to_subset`.
  Note that passing `prefix` will turn non-str keys into str keys.
  
  Parameters
  ----------
  dict_to_subset : dict
      dictionary to subset by keys
  keys : iterable
  prefix : str or None, optional
  
  Returns
  -------
  `subsetted_dict` : dict
      `dict_to_subset` subset to keys in `keys` described as above
docstr_tok: ["Subset","dictionary","d","to","keys","in","keys",".","Subsets","`","dict_to_subset","`","to","keys","in","iterable","`","keys","`",".","If","`","prefix","`","is","passed",",","subsets","to","`","f","''","{","prefix","}","__","{","key","}","''","`","for","all","`","key","`","in","`","keys","`",".","The","prefix","is","then","removed","from","the","keys","of","the","return","dict",",","i.e.",",","return","has","keys","`","{","key","}","`","where","`","f","''","{","prefix","}","__","{","key","}","''","`","was","key","in","`","dict_to_subset","`",".","Note","that","passing","`","prefix","`","will","turn","non-str","keys","into","str","keys",".","Parameters","--","--","--","--","--","dict_to_subset",":","dict","dictionary","to","subset","by","keys","keys",":","iterable","prefix",":","str","or","None",",","optional","Returns","--","--","--","-","`","subsetted_dict","`",":","dict","`","dict_to_subset","`","subset","to","keys","in","`","keys","`","described","as","above"]
code: def _subset_dict_keys(self, dict_to_subset, keys, prefix=None):
      """Subset dictionary d to keys in keys.
  
      Subsets `dict_to_subset` to keys in iterable `keys`.
  
      If `prefix` is passed, subsets to `f"{prefix}__{key}"` for all `key` in `keys`.
      The prefix is then removed from the keys of the return dict, i.e.,
      return has keys `{key}` where `f"{prefix}__{key}"` was key in `dict_to_subset`.
      Note that passing `prefix` will turn non-str keys into str keys.
  
      Parameters
      ----------
      dict_to_subset : dict
          dictionary to subset by keys
      keys : iterable
      prefix : str or None, optional
  
      Returns
      -------
      `subsetted_dict` : dict
          `dict_to_subset` subset to keys in `keys` described as above
      """
  
      def rem_prefix(x):
          if prefix is None:
              return x
          prefix__ = f"{prefix}__"
          if x.startswith(prefix__):
              return x[len(prefix__) :]
          else:
              return x
  
      if prefix is not None:
          keys = [f"{prefix}__{key}" for key in keys]
      keys_in_both = set(keys).intersection(dict_to_subset.keys())
      subsetted_dict = {
          rem_prefix(k): dict_to_subset[k] for k in keys_in_both
      }
      return subsetted_dict
  
imports: from inspect import isclass
  import numpy
  import pandas
  from sktime.base import BaseEstimator
label_desc: Use image node_id 9 for calling the _HeterogenousMetaEstimator obj's underlying member method code with example usage: obj._subset_dict_keys(dict_to_subset, keys, prefix) and returns: subsetted_dict, x, x, x