def _abbrieviate_direction(ext_dir_str):
    'Convert extended (non-abbrievated) directions to abbrieviation.'
    return ext_dir_str.upper().replace('_', '').replace('-', '').replace(' ', '').replace('NORTH', 'N').replace('EAST', 'E').replace('SOUTH', 'S').replace('WEST', 'W')
Convert extended (non-abbrievated) directions to abbrieviation.
def _abbrieviate_direction(ext_dir_str):
    
    return ext_dir_str.upper().replace('_', ).replace('-', ).replace(' ', ).replace('NORTH', 'N').replace('EAST', 'E').replace('SOUTH', 'S').replace('WEST', 'W')