code: def get_data(query_func, load_data=False, save_data=False):
      
      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
docs: Gets data from query_func, optionally saving that data to a file; or loads data from a file.