def __get_type_JMA(code):
    """
    Get the type (grade) of the JMA TC records.
    Reference:
    https://www.jma.go.jp/jma/jma-eng/jma-center/rsmc-hp-pub-eg/Besttracks/e_format_bst.html
    
    1 - not used
    2 - tropical depression (TD)
    3 - tropical storm (TS)
    4 - severe tropical storm (STS)
    5 - typhoon (TY)
    6 - extra-tropical cyclone (EC)
    7 - just entering into the responsible area of JMA
    8 - not used
    9 - tropical cyclone of TC intensity or higher

    Parameters
    ----------
    code : str
        A string code represents the type.

    Returns
    -------
    re : str
        One of the type in ['TD', 'TS', 'STS', 'TY', 'EC', 'OTHERS'].
    """
    if code in ['1', '7', '8', '9']:
        return 'OTHERS'
    elif code == '2':
        return 'TD'
    elif code == '3':
        return 'TS'
    elif code == '4':
        return 'STS'
    elif code == '5':
        return 'TY'
    elif code == '6':
        return 'EC'
    else:
        raise Exception('unknown code ' + code)