code: def test_valid_no_py_error():
      try:
          noise_generation.generate_noise_matrix_from_trace(
              K=3,
              trace=2,
              valid_noise_matrix=True,
          )
      except ValueError as e:
          assert "py must be" in str(e)
          with pytest.raises(ValueError) as e:
              noise_generation.generate_noise_matrix_from_trace(
                  K=3,
                  trace=2,
                  valid_noise_matrix=True,
              )
  
imports: import numpy
  from cleanlab.benchmarking import noise_generation
  import pytest
label_desc: Use image node_id 12 for calling a global function with example usage: test_valid_no_py_error() without return types