<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_data(query_func, load_data=False, save_data=False):
 """Gets data from query_func, optionally saving that data to a file; or loads data from a file."""

    if hasattr(query_func, '__name__'):
        func_name = query_func.__name__
    elif hasattr(query_func, 'func'):
        func_name = query_func.func.__name__

    pickle_file = '{}.pickle'.format(func_name)

    if load_data:
        data = load_object(pickle_file)
    else:
        data = query_func()
        if save_data:
            save_object(pickle_file, data)
    return data