def get_offset(name):
if name not in libfreqs._dont_uppercase:<EOL><INDENT>name = name.upper()<EOL>name = libfreqs._lite_rule_alias.get(name, name)<EOL>name = libfreqs._lite_rule_alias.get(name.lower(), name)<EOL><DEDENT>else:<EOL><INDENT>name = libfreqs._lite_rule_alias.get(name, name)<EOL><DEDENT>if name not in _offset_map:<EOL><INDENT>try:<EOL><INDENT>split = name.split('<STR_LIT:->')<EOL>klass = prefix_mapping[split[<NUM_LIT:0>]]<EOL>offset = klass._from_name(*split[<NUM_LIT:1>:])<EOL><DEDENT>except (ValueError, TypeError, KeyError):<EOL><INDENT>raise ValueError(libfreqs.INVALID_FREQ_ERR_MSG.format(name))<EOL><DEDENT>_offset_map[name] = offset<EOL><DEDENT>return _offset_map[name]<EOL>
Return DateOffset object associated with rule name

Examples
--------
get_offset('EOM') --> BMonthEnd(1)