code: def _map_cyclic(x, lbound, ubound):
      """Maps values into the interval [lbound, ubound] in a cyclic fashion.
  
      :param x: The 1-d array values to be mapped.
      :param lbound: The lower bound of the interval.
      :param ubound: The upper bound of the interval.
      :return: A new 1-d array containing mapped x values.
  
      :raise ValueError: if lbound >= ubound.
      """
      if lbound >= ubound:
          raise ValueError(
              "Invalid argument: lbound (%r) should be "
              "less than ubound (%r)." % (lbound, ubound)
          )
  
      x = np.copy(x)
      x[x > ubound] = lbound + (x[x > ubound] - ubound) % (
          ubound - lbound
      )
      x[x < lbound] = ubound - (lbound - x[x < lbound]) % (
          ubound - lbound
      )
  
      return x
  
imports: import numpy
  from patsy.util import have_pandas, atleast_2d_column_default, no_pickling, assert_no_pickling, safe_string_eq
  from patsy.state import stateful_transform
label_desc: Use image node_id 2 for calling a global function with example usage: _map_cyclic(x, lbound, ubound) and returns: x