code: def backend_wrapper(request):
      """
      Returns a callable that takes a function algo and wraps it in another
      function that calls the algo using the appropriate backend.
  
      For example: if the backend to test is "cugraph", this will return a
      function that calls nx.pagerank(..., backend='cugraph')
      """
      backend_name = request.param
      actual_backend_name = backend_name
  
      # Special case: cugraph-preconverted may be specified as a backend but this
      # name is reserved to indicate a cugraph backend is to be used with a
      # preconverted graph obj (rather than having the backend do the
      # conversion).
      if backend_name == "cugraph-preconverted":
          actual_backend_name = "cugraph"
  
      # NX <3.2 does not support the backends= kwarg, so the backend must be
      # enabled differently
      if backends is not None:
          wrapper = get_legacy_backend_wrapper(actual_backend_name)
      else:
          wrapper = get_backend_wrapper(actual_backend_name)
  
      wrapper.backend_name = backend_name
      return wrapper
  
imports: import random
  import networkx
  import pandas
  import pytest
  from cugraph import datasets
  import nx_cugraph
label_desc: Use image node_id 7 for calling a global function with example usage: backend_wrapper(request) and returns: wrapper