code: def test_scheduler_highlevel_graph_unpack_import(
      op, lib, optimize_graph, loop, tmpdir
  ):
      # Test that array/dataframe-specific modules are not imported
      # on the scheduler when an HLG layers are unpacked/materialized.
  
      with cluster(
          scheduler_kwargs={"plugins": [SchedulerImportCheck(lib)]}
      ) as (
          scheduler,
          workers,
      ):
          with Client(scheduler["address"], loop=loop) as c:
              # Perform a computation using a HighLevelGraph Layer
              c.compute(op(tmpdir), optimize_graph=optimize_graph)
  
              # Get the new modules which were imported on the scheduler during the computation
              end_modules = c.run_on_scheduler(lambda: set(sys.modules))
              start_modules = c.run_on_scheduler(
                  lambda dask_scheduler: dask_scheduler.plugins[
                      SchedulerImportCheck.name
                  ].start_modules
              )
              new_modules = end_modules - start_modules
  
              # Check that the scheduler didn't start with `lib`
              # (otherwise we arent testing anything)
              assert not any(
                  module.startswith(lib) for module in start_modules
              )
  
              # Check whether we imported `lib` on the scheduler
              assert not any(
                  module.startswith(lib) for module in new_modules
              )
  
imports: from __future__ import annotations
  import os
  import pytest
  import sys
  from operator import getitem
  from distributed import Client, SchedulerPlugin
  from distributed.utils_test import cluster, loop
  from dask.highlevelgraph import HighLevelGraph
  from dask.layers import ArrayChunkShapeDep, ArraySliceDep, fractional_slice
label_desc: Use image node_id 12 for calling a global function with example usage: test_scheduler_highlevel_graph_unpack_import(op, lib, optimize_graph, loop, tmpdir) without return types