class_docstr: Provides a way to open a modal popup with the content of a graph figure.
class_docstr_tok: ["Provides","a","way","to","open","a","modal","popup","with","the","content","of","a","graph","figure","."]
code: def component_callbacks(self, app):
      @app.callback(
          [
              Output(self.name + "-modal", "is_open"),
              Output(self.name + "-modal-graph", "figure"),
          ],
          [
              Input(self.name + "modal-open", "n_clicks"),
              Input(self.name + "-modal-close", "n_clicks"),
          ],
          [
              State(self.name + "-modal", "is_open"),
              State(self.graph_id, "figure"),
          ],
      )
      def toggle_modal(open_modal, close_modal, modal_is_open, fig):
          if open_modal or close_modal:
              ctx = dash.callback_context
              button_id = ctx.triggered[0]["prop_id"].split(".")[0]
              if button_id == self.name + "modal-open":
                  return (not modal_is_open, fig)
              else:
                  return (not modal_is_open, dash.no_update)
          return (modal_is_open, dash.no_update)
  
      if self.description is not None:
  
          @app.callback(
              Output(self.name + "-fade", "is_in"),
              [Input(self.name + "-show-description", "n_clicks")],
              [State(self.name + "-fade", "is_in")],
          )
          def toggle_fade(n_clicks, is_in):
              if not n_clicks:
                  # Button has never been clicked
                  return False
              return not is_in
  
imports: import sys
  from abc import ABC
  import inspect
  import types
  from typing import Union, List, Tuple
  from pathlib import Path
  from importlib import import_module
  import socket
  import dash
  from dash import html, dcc, Input, Output, State
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from .None import to_html
label_desc: Use image node_id 3 for calling the GraphPopout obj's underlying member method code with example usage: obj.component_callbacks(app) and returns: modal_is_open,  dash, unknown, unknown,  fig, unknown,  dash, False