code: def get_backend_wrapper(backend_name):
      """
      Returns a callable that wraps an algo function in order to set the
      "backend" kwarg on it.
      This is only supported for NetworkX >= 3.2
      """
  
      def wrap_callable_for_dispatch(
          func, exhaust_returned_iterator=False
      ):
          def wrapper(*args, **kwargs):
              kwargs["backend"] = backend_name
              retval = func(*args, **kwargs)
              if exhaust_returned_iterator:
                  retval = list(retval)
              return retval
  
          return wrapper
  
      return wrap_callable_for_dispatch
  
imports: import random
  import networkx
  import pandas
  import pytest
  from cugraph import datasets
  import nx_cugraph
label_desc: Use image node_id 6 for calling a global function with example usage: get_backend_wrapper(backend_name) and returns: wrap_callable_for_dispatch, wrapper, retval