code: def get_ids_by(
      leaderboard_path,
      algorithm_name=None,
      cross_experiment_key=None,
      hyperparameter_key=None,
      drop_duplicates=True,
  ):
      """Get a list of experiment_ids that match the provided criteria
  
      Parameters
      ----------
      leaderboard_path: String
          The path to a leaderboard .csv file, which has at least the following columns:
          'experiment_id', 'hyperparameter_key', 'cross_experiment_key', 'algorithm_name'
      algorithm_name: String, or None, default=None
          If string, expects the name of an algorithm that may exist on the leaderboard, such as the
          following: 'LGBMRegressor', 'XGBClassifier', 'KerasClassifier', 'KMeans', 'BayesianRidge',
          'RGFClassifier', etc.
      cross_experiment_key: String, or None, default=None
          If string, expects a cross-experiment key hash produced during initialization of
          :class:`environment.Environment`
      hyperparameter_key: String, or None, default=None
          If string, expects a hyperparameter key hash produced by a child of
          :class:`experiments.BaseExperiment`
      drop_duplicates: Boolean, default=True
          If True, only a single entry for every unique triple of ('algorithm_name',
          'cross_experiment_key', 'hyperparameter_key') will be returned
  
      Returns
      -------
      matching_ids: List
          A list of experiment_id strings"""
      try:
          leaderboard = pd.read_csv(leaderboard_path, index_col=None)
          # TODO: Above should be `leaderboards.Leaderboard.from_path(leaderboard_path)`, instead
          # TODO: Keep current enclosing try/except
      except FileNotFoundError:
          return []
  
      if algorithm_name is not None:
          leaderboard = leaderboard.loc[
              leaderboard["algorithm_name"] == algorithm_name
          ]
      if cross_experiment_key is not None:
          leaderboard = leaderboard.loc[
              leaderboard["cross_experiment_key"]
              == cross_experiment_key
          ]
      if hyperparameter_key is not None:
          leaderboard = leaderboard.loc[
              leaderboard["hyperparameter_key"] == hyperparameter_key
          ]
  
      if drop_duplicates is True:
          # TODO: `drop_duplicates`' `keep` kwarg may be helpful if lb rows are sorted chronologically
          # TODO: ... https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop_duplicates.html
          leaderboard.drop_duplicates(
              subset=[
                  "algorithm_name",
                  "cross_experiment_key",
                  "hyperparameter_key",
              ],
              inplace=True,
          )
  
      matching_ids = leaderboard["experiment_id"].values.tolist()
      return matching_ids
  
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 1 for calling a global function with example usage: get_ids_by(leaderboard_path, algorithm_name, cross_experiment_key, hyperparameter_key, drop_duplicates) and returns: matching_ids, list