code: def _to_model_space(x: ep.Tensor, *, bounds: Bounds) -> ep.Tensor:
      min_, max_ = bounds
      x = x.tanh()  # from (-inf, +inf) to (-1, +1)
      a = (min_ + max_) / 2
      b = (max_ - min_) / 2
      x = x * b + a  # map from (-1, +1) to (min_, max_)
      return x
  
imports: from typing import Union, Tuple, Any, Optional
  from functools import partial
  import numpy
  import eagerpy
  from ..devutils import flatten
  from ..devutils import atleast_kd
  from ..types import Bounds
  from ..models import Model
  from ..distances import l2
  from ..criteria import Misclassification
  from ..criteria import TargetedMisclassification
  from .base import MinimizationAttack
  from .base import T
  from .base import get_criterion
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
  from .gradient_descent_base import AdamOptimizer
label_desc: Use image node_id 3 for calling a global function with example usage: _to_model_space(x) and returns: x