code: def _js_requires(offline: bool = False) -> str:
      """Format JS requires for Plotly dependency.
  
      Args:
          offline: if True, inject entire Plotly library for offline use.
  
      Returns:
          str: <script> block with Plotly dependency.
  
      """
      helper_fxns = _load_js_resource(_AxPlotJSResources.HELPER_FXNS)
      if offline:
          script = Template(
              _load_js_resource(_AxPlotJSResources.PLOTLY_OFFLINE)
          ).render(library=plotly_offline.offline.get_plotlyjs())
      else:
          script = _load_js_resource(_AxPlotJSResources.PLOTLY_ONLINE)
      return script + helper_fxns
  
file_path: Ax/ax/plot/render.py
imports: import enum
  import json
  import os
  import pkgutil
  import uuid
  from typing import Dict
  import plotly.offline
  from ax.plot.base import AxPlotConfig, AxPlotTypes
  from jinja2 import Template
label_desc: Use image node_id 3 for calling a global function with example usage: _js_requires(offline) and returns: unknown