def store_object(file_name, save_key, file_location, object_to_store=None):
file = __os.path.join(file_location, file_name)<EOL>try:<EOL><INDENT>shelve_store = __shelve.open(file)<EOL><DEDENT>except Exception as e:<EOL><INDENT>LOGGER.critical('<STR_LIT>'.format(error=e))<EOL>print('<STR_LIT>')<EOL>__os.remove(file)<EOL>shelve_store = __shelve.open(file)<EOL><DEDENT>shelve_store[save_key] = object_to_store<EOL>shelve_store.close()<EOL>
Function to store objects in a shelve
Args:
    file_name: Shelve storage file name
    save_key: The name of the key to store the item to
    file_location: The location of the file, derive from the os module
    object_to_store: The object you want to store

Returns: