code: def pytest_sessionstart(session):
      # if the --allow-rmm-reinit option is not given, set (or add to) the CLI
      # "mark expression" (-m) the markers for no managedmem and
      # poolallocator. This will result in the RMM reinit() function to be called
      # only once in the running process (the typical use case).
      #
      # FIXME: consider making the RMM config options set using a CLI option
      # instead of by markers. This would mean only one RMM config can be used
      # per test session, which could eliminate problems related to calling RMM
      # reinit multiple times in the same process. This would not be a major
      # change to the benchmark UX since the user is discouraged from doing a
      # reinit multiple times anyway (hence the --allow-rmm-reinit flag).
      if session.config.getoption("allow_rmm_reinit") is False:
          currentMarkexpr = session.config.getoption("markexpr")
  
          if ("managedmem" in currentMarkexpr) or (
              "poolallocator" in currentMarkexpr
          ):
              raise RuntimeError(
                  "managedmem and poolallocator markers cannot "
                  "be used without --allow-rmm-reinit."
              )
  
          newMarkexpr = "managedmem_off and poolallocator_on"
          if currentMarkexpr:
              newMarkexpr = f"({currentMarkexpr}) and ({newMarkexpr})"
  
          session.config.option.markexpr = newMarkexpr
  
      # Set the value of the CLI options for RMAT here since any RmatDataset
      # objects must be instantiated prior to running test fixtures in order to
      # have their test ID generated properly.
      # FIXME: is there a better way to do this?
      pytest._rmat_scale = session.config.getoption("rmat_scale")
      pytest._rmat_edgefactor = session.config.getoption(
          "rmat_edgefactor"
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_sessionstart(session) without return types