code: def caching_data_manager(
      self,
      df,
      sql_query,
      graph_type,
      calculated_funct=None,
      details_dict=None,
  ):
      status_file, file_exist, dff = self.caching_exists_in_file(
          sql_query, graph_type
      )
      if status_file:
          # print("{}/{}".format(graph_type, "exist in file"))
  
          return dff
      else:
          # print("{}/{}".format(graph_type, "don't exists"))
          random_str = self.random_string_generator()
          dict_bkp = self.creating_filtered_backup_file(
              sql_query, random_str, graph_type
          )
          dff = psql.sqldf(sql_query, locals())
          self.create_dir("data_storage/filtered_df")
          dict_bkp.to_csv(
              "./data_storage/{}/dictionary_bkp.csv".format(
                  "filtered_df"
              ),
              mode="a",
              header=file_exist is False,
              index=False,
          )
          dff.to_csv(
              "./data_storage/filtered_df/{}.csv".format(random_str),
              mode="w",
              header=file_exist is False,
              index=False,
          )
  
          results = dff
          if graph_type != "filtered_df":
              results = calculated_funct(
                  dff, self.param["is_classification"]
              )
          self.store_data_in_csv(results, graph_type, random_str)
          return results
  
imports: from imports import *
  from plotly_graphs import *
  from protodash import *
  from insights import *
  from plotly_css import *
  import pandasql
  import string
  import random
  import os
  from apps import global_explanation, local_explanation, distribution, feature_interaction, cohort
  from app import app
  from what_if import *
  from calculate_shap import *
  from analytics import Analytics
  from cohort_analysis import *
label_desc: Use image node_id 9 for calling the dashboard obj's underlying member method code with example usage: obj.caching_data_manager(df, sql_query, graph_type, calculated_funct, details_dict) and returns: dff, results