code: def pmin_sampled(mean, var, n_samples=1000, rng=None):
      """Probability that each Gaussian-dist R.V. is less than the others
  
      :param vscores: mean vector
      :param var: variance vector
  
      This function works by sampling n_samples from every (gaussian) mean distribution,
      and counting up the number of times each element's sample is the best.
  
      """
      if rng is None:
          rng = numpy.random.default_rng(232342)
  
      samples = (
          rng.standard_normal((n_samples, len(mean))) * numpy.sqrt(var)
          + mean
      )
      winners = (samples.T == samples.min(axis=1)).T
      wincounts = winners.sum(axis=0)
      assert wincounts.shape == mean.shape
      return wincounts.astype("float64") / wincounts.sum()
  
imports: import datetime
  import numpy
  import logging
  import os
  import shutil
  import sys
  import uuid
  import numpy
  from .None import pyll
  from contextlib import contextmanager
label_desc: Use image node_id 8 for calling a global function with example usage: pmin_sampled(mean, var, n_samples, rng) and returns: unknown