def extract_method(wrapped_method):
    """Gets original method if wrapped_method was decorated

    :rtype: any([types.FunctionType, types.MethodType])
    """
    return wrapped_method.orig_func if hasattr(wrapped_method, 'orig_func'
        ) else wrapped_method
