<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_base_most_function(function):
 """ Obtains the base function definition for the provided function. This could be used to obtain the original definition of a function, if the provided function is an override. Returns: (function):
 Returns the base-most function of a provided function. (The original definition). """

        # Loop through the list of inherited contracts and this contract, to find the first function instance which
        # matches this function's signature. Note here that `inheritance` is in order from most basic to most extended.
        for contract in function.contract.inheritance + [function.contract]:

            # Loop through the functions not inherited (explicitly defined in this contract).
            for f in contract.functions_not_inherited:

                # If it matches names, this is the base most function.
                if f.full_name == function.full_name:
                    return f

        # Somehow we couldn't resolve it, which shouldn't happen, as the provided function should be found if we could
        # not find some any more basic.
        raise Exception("Could not resolve the base-most function for the provided function.")