<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_same_function(f1, f2):
 """returns true if f1 and f2 is same function Use case: sometimes when user defines some virtual function in base class, it overrides it in a derived one. Sometimes we need to know whether two member functions is actually same function. """

    if f1 is f2:
        return True
    if f1.__class__ is not f2.__class__:
        return False
    if isinstance(f1, calldef_members.member_calldef_t) and \
            f1.has_const != f2.has_const:
        return False
    if f1.name != f2.name:
        return False
    if not is_same_return_type(f1, f2):
        return False
    if len(f1.arguments) != len(f2.arguments):
        return False
    for f1_arg, f2_arg in zip(f1.arguments, f2.arguments):
        if not type_traits.is_same(f1_arg.decl_type, f2_arg.decl_type):
            return False
    return True