code: def affine_sigmoid(real, lo=0, hi=1):
      """Maps reals to (lo, hi), where 0 maps to (lo+hi)/2."""
      if not lo < hi:
          raise ValueError("`lo` (%g) must be < `hi` (%g)" % (lo, hi))
      alpha = jax.nn.sigmoid(real) * (hi - lo) + lo
      return alpha
  
imports: import collections
  from concurrent import futures
  import contextlib
  import functools
  import time
  from typing import List, Union
  import jax
  from jax import tree_util
  import jax.numpy
  import numpy
  from scipy import interpolate
  from scipy.spatial import transform
  import tqdm
label_desc: Use image node_id 10 for calling a global function with example usage: affine_sigmoid(real, lo, hi) and returns: alpha