code: 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')
              )
docs: Convert extended (non-abbrievated) directions to abbrieviation.