def Wrap(values, lower_bound, upper_bound):
  """Wrap-around values within lower (inclusive) and upper (exclusive) bounds.

  Example: Wrap(np.array([-200, 60, 270]), -180, 180) = np.array([160, 60, -90])

  Args:
    values: The input numpy array to be wrapped.
    lower_bound: The lower bound of the wrap-around range.
    upper_bound: The upper bound of the wrap-around range.

  Returns:
    A new numpy array with values wrapped around.
  """
  return (values - lower_bound) % (upper_bound - lower_bound) + lower_bound