def basic_interactive_setup(autovisualize_arrays: bool = True):
  """Sets up IPython for interactive use with Treescope.

  This is a compatibility wrapper for `treescope.basic_interactive_setup`, which
  also turns on support for rendering objects implementing the old
  `__penzai_repr__` method. Consider using `treescope.basic_interactive_setup`
  directly instead.

  Args:
    autovisualize_arrays: Whether to automatically visualize arrays.
  """
  treescope.basic_interactive_setup(autovisualize_arrays=autovisualize_arrays)
  treescope.active_renderer.set_globally(
      _active_renderer_extended_with_penzai_repr()
  )
Sets up IPython for interactive use with Treescope.

  This is a compatibility wrapper for `treescope.basic_interactive_setup`, which
  also turns on support for rendering objects implementing the old
  `__penzai_repr__` method. Consider using `treescope.basic_interactive_setup`
  directly instead.

  Args:
    autovisualize_arrays: Whether to automatically visualize arrays.
  
penzai/treescope/_compatibility_setup.py