code: def scale_samples(params: np.ndarray, problem: Dict):
      """Scale samples based on specified distribution (defaulting to uniform).
  
      Adds an entry to the problem specification to indicate samples have been
      scaled to maintain backwards compatibility (`sample_scaled`).
  
      Parameters
      ----------
      params : np.ndarray,
          numpy array of dimensions `num_params`-by-:math:`N`,
          where :math:`N` is the number of samples
      problem : dictionary,
          SALib problem specification
  
      Returns
      -------
      np.ndarray, scaled samples
      """
      bounds = problem["bounds"]
      dists = problem.get("dists")
  
      if dists is None:
          _scale_samples(params, bounds)
      else:
          if params.shape[1] != len(dists):
              msg = "Mismatch in number of parameters and distributions.\n"
              msg += "Num parameters: {}".format(params.shape[1])
              msg += "Num distributions: {}".format(len(dists))
              raise ValueError(msg)
  
          params = _nonuniform_scale_samples(params, bounds, dists)
  
      problem["sample_scaled"] = True
  
      return params
  
file_path: SALib/src/SALib/util/__init__.py
imports: from collections import OrderedDict
  from typing import Dict, Tuple
  import warnings
  import numpy
  import scipy
  from typing import List
  from .util_funcs import avail_approaches, read_param_file, _check_bounds, _check_groups
  from .problem import ProblemSpec
  from .results import ResultDict
label_desc: Use image node_id 2 for calling a global function with example usage: scale_samples(params, problem) and returns: params