code: def test_mg_uniform_neighbor_sample_tree(dask_client, directed):
      input_data_path = small_tree.get_path()
      chunksize = dcg.get_chunksize(input_data_path)
  
      ddf = dask_cudf.read_csv(
          input_data_path,
          chunksize=chunksize,
          delimiter=" ",
          names=["src", "dst", "value"],
          dtype=["int32", "int32", "float32"],
      )
  
      G = cugraph.Graph(directed=directed)
      G.from_dask_cudf_edgelist(
          ddf, "src", "dst", "value", store_transposed=False
      )
  
      # TODO: Incomplete, include more testing for tree graph as well as
      # for larger graphs
      start_list = cudf.Series([0, 0], dtype="int32")
      fanout_vals = [4, 1, 3]
      with_replacement = True
      result_nbr = uniform_neighbor_sample(
          G, start_list, fanout_vals, with_replacement=with_replacement
      )
  
      result_nbr = result_nbr.drop_duplicates()
  
      # input_df != ddf if 'directed = False' because ddf will be symmetrized
      # internally.
      input_df = G.input_df
      join = result_nbr.merge(
          input_df,
          left_on=[*result_nbr.columns[:2]],
          right_on=[*input_df.columns[:2]],
      )
  
      assert len(join) == len(result_nbr)
      # Since the validity of results have (probably) been tested at both the C++
      # and C layers, simply test that the python interface and conversions were
      # done correctly.
      assert result_nbr["sources"].dtype == "int32"
      assert result_nbr["destinations"].dtype == "int32"
      assert result_nbr["indices"].dtype == "float32"
  
      result_nbr_vertices = (
          dask_cudf.concat(
              [result_nbr["sources"], result_nbr["destinations"]]
          )
          .drop_duplicates()
          .compute()
          .reset_index(drop=True)
      )
  
      result_nbr_vertices = result_nbr_vertices.to_pandas()
      start_list = start_list.to_pandas()
  
      # The vertices in start_list must be a subsets of the vertices
      # in the result
      assert set(start_list).issubset(set(result_nbr_vertices))
  
imports: import gc
  import random
  import os
  import pytest
  import pandas
  import cupy
  import cudf
  import cugraph
  import dask_cudf
  import cugraph.dask
  from cugraph.testing import UNDIRECTED_DATASETS
  from cugraph.dask import uniform_neighbor_sample
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.datasets import email_Eu_core, small_tree
  from pylibcugraph.testing.utils import gen_fixture_params_product
label_desc: Use image node_id 4 for calling a global function with example usage: test_mg_uniform_neighbor_sample_tree(dask_client, directed) without return types