code: def test__get_label_quality_per_image():
      # Test when pixel_scores is a random list of 100 values, method is "softmin", and temperature is random
      random_score_array = np.random.random((100,))
      temp = random.random()
      score = _get_label_quality_per_image(
          random_score_array, method="softmin", temperature=temp
      )
  
      cleanlab_softmin = softmin(
          np.expand_dims(random_score_array, axis=0),
          axis=1,
          temperature=temp,
      )[0]
      assert (
          cleanlab_softmin == score
      ), "Expected cleanlab_softmin to be equal to score"
  
      # Test when pixel_scores is an empty list, should raise an error
      empty_score_array = np.array([])
      with pytest.raises(Exception) as e:
          _get_label_quality_per_image(
              empty_score_array, method="softmin", temperature=temp
          )
  
      # Test when method is None
      with pytest.raises(Exception):
          _get_label_quality_per_image(
              random_score_array, method=None, temperature=temp
          )
  
      # Test when method is not "softmin", should raise an exception
      with pytest.raises(Exception):
          _get_label_quality_per_image(
              random_score_array,
              method="invalid_method",
              temperature=temp,
          )
  
      #     Test when temperature is 0, should raise an error
      with pytest.raises(Exception):
          _get_label_quality_per_image(
              random_score_array, method="softmin", temperature=0
          )
  
      with pytest.raises(Exception):
          _get_label_quality_per_image(
              random_score_array, method="softmin", temperature=None
          )
  
imports: import numpy
  import random
  import pytest
  from unittest import mock
  import matplotlib.pyplot
  from pathlib import Path
  from cleanlab.internal.multilabel_scorer import softmin
  from cleanlab.internal.segmentation_utils import _check_input, _get_valid_optional_params, _get_summary_optional_params
  from cleanlab.segmentation.filter import find_label_issues
  from cleanlab.segmentation.rank import get_label_quality_scores, issues_from_scores, _get_label_quality_per_image
  from cleanlab.segmentation.summary import display_issues, common_label_issues, filter_by_class, _generate_colormap
label_desc: Use image node_id 15 for calling a global function with example usage: test__get_label_quality_per_image() without return types