code: def _to_int(
      value: tp.Union[float, np.ndarray]
  ) -> tp.Union[int, np.ndarray]:
      """Returns a int from a float, or a int typed array from a float array"""
      if not isinstance(value, np.ndarray):
          return int(np.round(value))
      else:
          return np.round(value).astype(int)
  
imports: import uuid
  import copy
  import bisect
  from enum import Enum
  import numpy
  from nevergrad.common import errors
  import nevergrad.common.typing
label_desc: Use image node_id 1 for calling a global function with example usage: _to_int(value) and returns: int, np