code: def test_get_weights(
      self, setup, kg, root, sampler, is_reverse, is_inverse, is_split
  ):
      if "UniformSampler" in str(sampler):
          sampler = sampler()
      else:
          sampler = sampler(is_inverse, is_split)
      sampler.fit(kg)
  
      weights = sampler.get_weights(
          kg.get_hops(Vertex(f"{URL}#{root}"), is_reverse=is_reverse)
      )
      assert isinstance(weights, list)
      if len(weights) > 0:
          for weight in weights:
              assert weight <= 1
  
imports: import itertools
  import pytest
  from pyrdf2vec.graphs import KG, Vertex
  from pyrdf2vec.samplers import ObjFreqSampler, ObjPredFreqSampler, PageRankSampler, PredFreqSampler, UniformSampler
label_desc: Use image node_id 2 for calling the TestSampler obj's underlying member method code with example usage: obj.test_get_weights(setup, kg, root, sampler, is_reverse, is_inverse, is_split) without return types