def get_result(self, obj, method, key, axis):
if isinstance(key, dict):<EOL><INDENT>key = key[axis]<EOL><DEDENT>if method == '<STR_LIT>':<EOL><INDENT>method = '<STR_LIT>'<EOL>key = obj._get_axis(axis)[key]<EOL><DEDENT>with catch_warnings(record=True):<EOL><INDENT>try:<EOL><INDENT>xp = getattr(obj, method).__getitem__(_axify(obj, key, axis))<EOL><DEDENT>except AttributeError:<EOL><INDENT>xp = getattr(obj, method).__getitem__(key)<EOL><DEDENT><DEDENT>return xp<EOL>
return the result for this obj with this key and this axis