class_docstr: Hacky way to sample in the space defined by the parametrization.
  Given an vector of values between 0 and 1,
  the transform method samples in the bounds if provided,
  or using the provided function otherwise.
  This is used for samplers.
  Code of parametrization and/or this helper should definitely be
  updated to make it simpler and more robust
class_docstr_tok: ["Hacky","way","to","sample","in","the","space","defined","by","the","parametrization",".","Given","an","vector","of","values","between","0","and","1",",","the","transform","method","samples","in","the","bounds","if","provided",",","or","using","the","provided","function","otherwise",".","This","is","used","for","samplers",".","Code","of","parametrization","and\/or","this","helper","should","definitely","be","updated","to","make","it","simpler","and","more","robust"]
code: def _apply_unsafe(self, x: np.ndarray, forward: bool = True) -> None:
      # modifies x in place
      start = 0
      utrans = (
          self.unbounded_transform.forward
          if forward
          else self.unbounded_transform.backward
      )
      for ref in self._ref_arrays:
          end = start + ref.dimension
          layers = _fully_bounded_layers(ref)
          if self._only_sampling:  # for samplers
              layers = [lay for lay in layers if lay.uniform_sampling]
          if not layers:
              x[start:end] = utrans(x[start:end])
          else:
              layer_index = layers[-1]._layer_index
              array = ref.spawn_child()
              if forward:
                  array.set_standardized_data(x[start:end])
                  x[start:end] = array._layers[layer_index].get_normalized_value()[:]  # type: ignore
  
              else:
                  normalized = x[start:end].reshape(ref._value.shape)
                  array._layers[layer_index].set_normalized_value(normalized)  # type: ignore
                  x[start:end] = array.get_standardized_data(
                      reference=ref
                  )
          start = end
  
imports: import warnings
  import contextlib
  import itertools
  import numpy
  import nevergrad.common.typing
  from .None import core
  from .None import container
  from .None import _layering
  from .None import _datalayers
  from .None import data
  from .None import choice
  from .None import transforms
label_desc: Use image node_id 6 for calling the Normalizer obj's underlying member method code with example usage: obj._apply_unsafe(x, forward) without return types