code: def test_active_scalars_remain(sphere, hexbeam):
      """Ensure active scalars remain active despite plotting different scalars when copy_mesh=True."""
      sphere.clear_data()
      hexbeam.clear_data()
      point_data_name = "point_data"
      cell_data_name = "cell_data"
      sphere[point_data_name] = np.random.default_rng().random(
          sphere.n_points
      )
      hexbeam[cell_data_name] = np.random.default_rng().random(
          hexbeam.n_cells
      )
      assert sphere.point_data.active_scalars_name == point_data_name
      assert hexbeam.cell_data.active_scalars_name == cell_data_name
  
      pl = pv.Plotter()
      pl.add_mesh(
          sphere, scalars=range(sphere.n_points), copy_mesh=True
      )
      pl.add_mesh(
          hexbeam, scalars=range(hexbeam.n_cells), copy_mesh=True
      )
      pl.close()
  
      assert sphere.point_data.active_scalars_name == point_data_name
      assert hexbeam.cell_data.active_scalars_name == cell_data_name
  
imports: import os
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista.core.errors import MissingDataError, PyVistaDeprecationWarning
  from pyvista.plotting import _plotting
  from pyvista.plotting.errors import RenderWindowUnavailable
  from pyvista.plotting.utilities.gl_checks import uses_egl
label_desc: Use image node_id 15 for calling a global function with example usage: test_active_scalars_remain(sphere, hexbeam) without return types