get_storage

safe_learning.utilities.get_storage(dictionary, index=None)

Get a unique storage point within a class method.

Parameters:
dictionary : dict

A dictionary used for storage.

index : hashable

An index under which to store the element. Needs to be hashable. This is useful for functions which might be accessed with multiple different arguments.

Returns:
storage : OrderedDict

The storage object. Is None if no storage exists. Otherwise it returns the OrderedDict that was previously put in the storage.