<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __chunk(segment, abbr=False):
 """Generate a ``tuple`` of compass direction names. Args: segment (list):
 Compass segment to generate names for abbr (bool):
 Names should use single letter abbreviations Returns: bool: Direction names for compass segment """

    names = ('north', 'east', 'south', 'west', 'north')
    if not abbr:
        sjoin = '-'
    else:
        names = [s[0].upper() for s in names]
        sjoin = ''
    if segment % 2 == 0:
        return (names[segment].capitalize(),
                sjoin.join((names[segment].capitalize(), names[segment],
                            names[segment + 1])),
                sjoin.join((names[segment].capitalize(), names[segment + 1])),
                sjoin.join((names[segment + 1].capitalize(), names[segment],
                            names[segment + 1])))
    else:
        return (names[segment].capitalize(),
                sjoin.join((names[segment].capitalize(), names[segment + 1],
                            names[segment])),
                sjoin.join((names[segment + 1].capitalize(), names[segment])),
                sjoin.join((names[segment + 1].capitalize(),
                            names[segment + 1], names[segment])))