docstr: Display matplotlib plot against a user query.
  
  If `open_charts` option set to `False`, the chart won't be displayed.
  
  Args:
      result (dict): result contains type and value
  Returns:
      Any: Returns depending on the user input
docstr_tok: ["Display","matplotlib","plot","against","a","user","query",".","If","`","open_charts","`","option","set","to","`","False","`",",","the","chart","wo","n't","be","displayed",".","Args",":","result","(","dict",")",":","result","contains","type","and","value","Returns",":","Any",":","Returns","depending","on","the","user","input"]
code: def format_plot(self, result: dict) -> Any:
      """
      Display matplotlib plot against a user query.
  
      If `open_charts` option set to `False`, the chart won't be displayed.
  
      Args:
          result (dict): result contains type and value
      Returns:
          Any: Returns depending on the user input
      """
      if not self._context._config.open_charts:
          return
  
      with Image.open(result["value"]) as img:
          img.show()
  
      return result["value"]
  
file_path: pandas-ai/pandasai/responses/response_parser.py
imports: from abc import ABC, abstractmethod
  from typing import Any
  from ..helpers.df_info import polars_imported
  from PIL import Image
  from pandasai.exceptions import MethodNotImplementedError
label_desc: Use image node_id 4 for calling the ResponseParser obj's underlying member method code with example usage: obj.format_plot(result) and returns: result