def _get_random_center_shift(num_objects, maxshift, rng):
    """Returns random shifts in x and y coordinates between + and - max-shift in arcseconds.

    Args:
        num_objects (int): Number of x and y shifts to return.

    Returns:
        x_peak (float): random shift along the x axis
        y_peak (float): random shift along the x axis
    """
    x_peak = rng.uniform(-maxshift, maxshift, size=num_objects)
    y_peak = rng.uniform(-maxshift, maxshift, size=num_objects)
    return x_peak, y_peak