code: def test_invalid_weight(self, sampler, is_inverse, is_split):
      with pytest.raises(ValueError):
          sampler(is_inverse, is_split).get_weight(None)
  
file_path: pyRDF2Vec/tests/samplers/test_frequency.py
imports: import itertools
  import pytest
  from pyrdf2vec.graphs import KG, Vertex
  from pyrdf2vec.samplers import ObjFreqSampler, ObjPredFreqSampler, PredFreqSampler
label_desc: Use image node_id 2 for calling the TestFreqSampler obj's underlying member method code with example usage: obj.test_invalid_weight(sampler, is_inverse, is_split) without return types