code: def filter_by_space(hyperparameters_and_scores, space):
      """Reject any `hyperparameters_and_scores` tuples whose hyperparameters do not fit in `space`
  
      Parameters
      ----------
      hyperparameters_and_scores: List of tuples
          Each tuple in list should be a pair of form (hyperparameters <dict>, evaluation <float>),
          where the hyperparameter dict should contain at least the following keys:
          ['model_init_params', 'model_extra_params', 'feature_engineer', 'feature_selector']
      space: `space.space_core.Space`
          The boundaries of the hyperparameters to be searched
  
      Returns
      -------
      hyperparameters_and_scores: List of tuples
          Filtered to include only those whose hyperparameters fit within `space`
      """
      return [
          _
          for _ in hyperparameters_and_scores
          if does_fit_in_space(_[0], space)
      ]
  
file_path: hyperparameter_hunter/hyperparameter_hunter/utils/optimization_utils.py
imports: from hyperparameter_hunter.i_o.exceptions import ContinueRemap
  from hyperparameter_hunter.keys.hashing import make_hash_sha256
  from hyperparameter_hunter.space.dimensions import Real, Integer, Categorical, RejectedOptional
  from hyperparameter_hunter.utils.boltons_utils import get_path, remap
  from hyperparameter_hunter.utils.file_utils import read_json
  from hyperparameter_hunter.utils.general_utils import extra_enter_attrs
  from contextlib import suppress
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: filter_by_space(hyperparameters_and_scores, space) and returns: unknown