code: def test_invalid_weights(
      weights: Callable[[int], np.ndarray]
  ) -> None:
      parameters = _ParzenEstimatorParameters(
          prior_weight=1.0,
          consider_prior=False,
          consider_magic_clip=False,
          consider_endpoints=False,
          weights=weights,
          multivariate=False,
          categorical_distance_func={},
      )
      with pytest.raises(ValueError):
          _ParzenEstimator(
              {"a": np.asarray([0.0])},
              {"a": distributions.FloatDistribution(-1.0, 1.0)},
              parameters,
          )
  
imports: from typing import Callable
  from typing import Dict
  from typing import List
  import numpy
  import pytest
  from optuna import distributions
  from optuna.distributions import CategoricalChoiceType
  from optuna.samplers._tpe.parzen_estimator import _ParzenEstimator
  from optuna.samplers._tpe.parzen_estimator import _ParzenEstimatorParameters
  from optuna.samplers._tpe.probability_distributions import _BatchedCategoricalDistributions
  from optuna.samplers._tpe.probability_distributions import _BatchedDiscreteTruncNormDistributions
  from optuna.samplers._tpe.probability_distributions import _BatchedTruncNormDistributions
  from optuna.samplers._tpe.probability_distributions import _MixtureOfProductDistribution
  from optuna.samplers._tpe.sampler import default_weights
label_desc: Use image node_id 7 for calling a global function with example usage: test_invalid_weights(weights) without return types