def gettrans(t):
obj = t<EOL>if isinstance(obj, str):<EOL><INDENT>name = '<STR_LIT>'.format(obj)<EOL>obj = globals()[name]()<EOL><DEDENT>if callable(obj):<EOL><INDENT>obj = obj()<EOL><DEDENT>if isinstance(obj, type):<EOL><INDENT>obj = obj()<EOL><DEDENT>if not isinstance(obj, trans):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return obj<EOL>
Return a trans object

Parameters
----------
t : str | callable | type | trans
    name of transformation function

Returns
-------
out : trans