releso.base_model.add_save_location_if_elem_is_o_dict

releso.base_model.add_save_location_if_elem_is_o_dict(possible_value: Any, save_location: Path)

Add the save_location keyword to the element of it is a dict.

This function adds the save_location to all ordered dicts in possible_value if it is not already present. This function is used to forward the save_location variable to all child objects so that all objects can access it.

Also handles adding the save_location to objects inside of lists (these can even be multiple lists deep)

Parameters:
  • possible_value (Any) – Variable holding potential objects which need

  • save_location. (the)

  • save_location (str) – string that defines the location