perturbopy.test_utils.run_test.run_utils.key_in_dict

perturbopy.test_utils.run_test.run_utils.key_in_dict(k, d, exact_match=False)

Check is a key is in dictionary.

Parameters:
  • k (str) – A dictionary key.

  • d (dict) – A dictionary.

  • exact_match (bool) – Whether apply or not the exact match condition for the key

Returns:

  • key (str) – A key from dictionary d that contains k

  • condition (bool) – True is the key k is in dict d