def _nbr_prev(geohash):
    """Helper function for computing S/W neighbors."""
    GH = list(geohash)
    for i in range(len(GH) - 1, -1, -1):
        if GH[i] == '0':
            GH[i] = '1'
        else:
            GH[i] = '0'
            break
    return GH
