def labelfile_generator(labelfile, example='east'):
    """
    Generate a label file template.

    Parameters
    ----------
    labelfile : string
        Full or relative path to template location
    example : string
        Default 'east'.  Also accepts 'west'.  Sample
        label file for each hemisphere.  Each has slightly different
        formatting.

    """
    lbdict = {'east': ['File header\n', 'SEA\n',
        """  fontstyle=italic   weight=normal   fontsize=16
""",
        '  16.00    88.50     Bay of\\nBengal\n',
        ' -15.05   115.00     South\\nChina\\nSea\n',
        """  27.00   125.00     East\\nChina\\nSea
""", 'CITY\n',
        '  fontstyle=normal   weight=normal   fontsize=15\n',
        """  39.91   116.39     Beijing
""",
        '  32.05   118.77     Nanjing\n', '  25.27   110.28     Guilin\n',
        'COUNTRY\n',
        """  fontstyle=normal   weight=bold     fontsize=20
""",
        '  35.00   100.00     CHINA\n', 'OCEAN\n',
        """  fontstyle=italic   weight=bold     fontsize=20
""",
        '  27.00   150.00     Pacific\\n\\nOcean\n',
        '  -5.00    70.00     Indian Ocean\n', 'PLACE\n',
        """  fontstyle=normal   weight=normal   fontsize=15
""",
        '  32.29   119.05     Hulu Cave\n'], 'west': ['File header\n',
        'SEA\n', """  fontstyle=italic   weight=normal   fontsize=13
""",
        '  26.00   -90.00     Gulf of\\nMexico\n', 'CITY\n',
        """  fontstyle=normal   weight=normal   fontsize=15
""",
        '  44.98   -93.26     Minneapolis\n', 'COUNTRY\n',
        """  fontstyle=normal   weight=normal   fontsize=15
""",
        '  40.00   -110.00    United\\nStates\n', 'OCEAN\n',
        """  fontstyle=italic   weight=normal   fontsize=18
""",
        '  25.00  -150.00     Pacific\\n\\nOcean\n', 'PLACE\n',
        """  fontstyle=normal   weight=normal   fontsize=15
""",
        '  38.98  -114.30     Great Basin\\nNational Park\n']}
    if example is not 'east' and example is not 'west':
        example = 'east'
    labels = lbdict['example']
    with open(labelfile, 'w') as labelfile:
        labelfile.writelines(labels)
        labelfile.flush()
