class_docstr: `Page` A container object to present multiple charts vertically in a single page
class_docstr_tok: ["`","Page","`","A","container","object","to","present","multiple","charts","vertically","in","a","single","page"]
code: def _prepare_render(self):
      for c in self:
          if hasattr(c, "dump_options"):
              c.json_contents = c.dump_options()
          if hasattr(c, "theme"):
              if c.theme not in ThemeType.BUILTIN_THEMES:
                  self.js_dependencies.add(c.theme)
      charts_id = []
      if self.layout == _MARK_FREEDOM_LAYOUT:
          self.download_button = True
          for c in self:
              charts_id.append("'{}'".format(c.chart_id))
              self.add_js_funcs(
                  # make charts resizable and draggable
                  f"$('#{c.chart_id}')"
                  ".resizable()"
                  ".draggable()"
                  ".css('border-style', 'dashed')"
                  ".css('border-width', '1px');"
                  # make charts Responsive
                  f'$("#{c.chart_id}>div:nth-child(1)")'
                  '.width("100%")'
                  '.height("100%");'
              )
  
              if not hasattr(c, "_component_type"):
                  self.add_js_funcs(
                      # call resize function
                      "new ResizeSensor("
                      f"jQuery('#{c.chart_id}'), "
                      f"function() {{ chart_{c.chart_id}.resize()}});"
                  )
          for lib in ("jquery", "jquery-ui", "resize-sensor"):
              self.js_dependencies.add(lib)
  
          self.add_js_funcs(
              "var charts_id = [{}];".format(",".join(charts_id))
              + DOWNLOAD_CFG_FUNC
          )
          self.css_libs = [
              self.js_host + link for link in ("jquery-ui.css",)
          ]
          self.layout = ""
  
imports: import json
  import re
  import uuid
  from jinja2 import Environment
  from ...None import types
  from ...commons import utils
  from ...globals import CurrentConfig, ThemeType
  from ...options import PageLayoutOpts
  from ...render import engine
  from ..mixins import CompositeMixin
label_desc: Use image node_id 4 for calling the Page obj's underlying member method code with example usage: obj._prepare_render() without return types