code: def strict_onehot_round(x: np.ndarray) -> np.ndarray:
      """Round x to a one-hot vector by selecting the max element.
      Ties broken randomly."""
      if len(x) == 1:
          return np.round(x)
      argmax = x == max(x)
      x[argmax] = 1
      x[~argmax] = 0
      return randomized_onehot_round(x)
  
file_path: Ax/ax/modelbridge/transforms/rounding.py
imports: import math
  import random
  from copy import copy
  from typing import Set
  import numpy
  from ax.core.parameter_constraint import OrderConstraint
  from ax.core.search_space import SearchSpace
  from ax.core.types import TParameterization
label_desc: Use image node_id 3 for calling a global function with example usage: strict_onehot_round(x) and returns: randomized_onehot_round, np